Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Allow overriding fallback paths for MSBuildExtensionsPath via a property #59

Merged
merged 2 commits into from
May 16, 2018

Conversation

radical
Copy link
Member

@radical radical commented May 13, 2018

This allows MSBuildExtensionsPath fallback paths to be overridden by setting
$(MSBuildExtensionsPathFallbackPathsOverride), without having to touch the
app.config .

Currently, the list of fallback paths in app.config can have a property
reference, like:

```
 <searchPaths os="osx">
	<property name="MSBuildExtensionsPath" value="$(FallbackPath);/x/y/z" />
```

.. but it is assumed that such a property will expand to a single path.

This commit adds support for such properties to expand to multiple ';'
separated list of paths. The rules for expansion do not change, they are still
expanded at the time of project import.

With this, given `$(FallbackPath)="/a/b/c;/q/w/e"` and the list of fallback paths
would become `"/a/b/c;/q/w/e;/x/yz"`.
.. MSBuildExtensionsPath.

For OSX, this essentially sets the fallback paths to:

`<property name="MSBuildExtensionsPath" value="$(MSBuildExtensionsPathFallbackPathsOverride);/Library/Frameworks/Mono.framework/External/xbuild/" />`

.. whichs allows the default fallback paths to be overridden by setting
a property - `$(MSBuildExtensionsPathFallbackPathsOverride)`.

One of the useful use cases for this is to be able to run tests with
in-tree builds of assemblies/targets meant for
`$(MSBuildExtensionsPath)/`. Simply changing `$(MSBuildExtensionsPath)` would
mean that the in-tree builds of the custom frameworks would work but the
default ones would not be found!
@radical radical force-pushed the extn-fallback-override-mono branch from 3c6ccea to 98ad643 Compare May 14, 2018 17:39
@radical radical merged commit c4e70a6 into mono:xplat-master May 16, 2018
radical added a commit that referenced this pull request Jun 2, 2018
… a property (#59)"

This reverts commit c4e70a6.

This is likely not getting accepted upstream.
radical added a commit that referenced this pull request Sep 26, 2018
akoeplinger added a commit that referenced this pull request Oct 11, 2018
akoeplinger added a commit that referenced this pull request Oct 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants