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

[mono] Fix regresion for XA (issue #1845) (#69) #72

Merged
merged 1 commit into from
Aug 28, 2018

Conversation

radical
Copy link
Member

@radical radical commented Aug 28, 2018

TargetFrameworks on osx have a default fallback search path:

`/Library/Frameworks/Mono.framework/External/xbuild-frameworks`

This was earlier implemented in mono/msbuild via the app.config, but
then was changed to be specified via the property
$(TargetFrameworkFallbackSearchPaths). And passed to
GetReferenceAssemblyPaths task via a new parameter
TargetFrameworkFallbackSearchPaths.

This also means that if any user of GetReferenceAssemblyPaths does not
use this new parameter, then on osx, msbuild won't be using any fallback
search path. In msbuild's targets files, we pass the new property as
argument for the new GRAP task parameter.

Accordingly, any non-msbuild users(targets) will need to update their
use of GRAP task to get the search path. But this would break any
existing/older users which are not using the new parameter and suddenly
find that projects won't build because of the missing search path.
Existing versions of Xamarin.Android are one example.

To ensure that they can continue working, we internally use the fallback
path if nothing is passed to the task. This can be disabled by setting
DISABLE_FALLBACK_PATHS_HACK_IN_GRAP_OSX env var.

Fixes dotnet/android#1845

(cherry picked from commit 8af44c5)

TargetFrameworks on osx have a default fallback search path:

    `/Library/Frameworks/Mono.framework/External/xbuild-frameworks`

This was earlier implemented in mono/msbuild via the app.config, but
then was changed to be specified via the property
`$(TargetFrameworkFallbackSearchPaths)`. And passed to
`GetReferenceAssemblyPaths` task via a new parameter
`TargetFrameworkFallbackSearchPaths`.

This also means that if any user of `GetReferenceAssemblyPaths` does not
use this new parameter, then on osx, msbuild won't be using any fallback
search path. In msbuild's targets files, we pass the new property as
argument for the new GRAP task parameter.

Accordingly, any non-msbuild users(targets) will need to update their
use of GRAP task to get the search path. But this would break any
existing/older users which are not using the new parameter and suddenly
find that projects won't build because of the missing search path.
Existing versions of Xamarin.Android are one example.

To ensure that they can continue working, we internally use the fallback
path if nothing is passed to the task. This can be disabled by setting
`DISABLE_FALLBACK_PATHS_HACK_IN_GRAP_OSX` env var.

Fixes dotnet/android#1845

(cherry picked from commit 8af44c5)
@radical radical merged commit 300887e into mono:xplat-master Aug 28, 2018
@radical radical deleted the fix-xa-support branch August 28, 2018 16:24
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