xamarin-macios/msbuild
Jonathan Peppers bba8fe731f
[msbuild] remove {GAC} from $(AssemblySearchPaths) (#7815)
Fixes: https://developercommunity.visualstudio.com/content/problem/788505/xamarin-found-conflicts-between-different-versions.html
Fixes: http://work.azdo.io/1008385
Context: 73b93c2dc9/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets (L337-L341)

On Windows only, Xamarin.Forms projects hit the build warning:

    Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Numerics" that could not be resolved.
    These reference conflicts are listed in the build log when log verbosity is set to detailed.

The difference appears to be the `{GAC}` search path is used on
Windows, but not Mac.

In fact, the output of `<ResolveAssemblyReference/>` on Mac reports:

    Unused locations
        {CandidateAssemblyFiles}
        {HintPathFromItem}
        {Registry:Software/Microsoft/Xamarin.iOS,v1.0,AssemblyFoldersEx}
        {AssemblyFolders}
        {GAC}
        bin/iPhoneSimulator/Debug/
    Used locations
        {TargetFrameworkDirectory}
        {RawFileName}

Compared to Windows:

    Used locations
        {TargetFrameworkDirectory}
        {GAC}
        {RawFileName}

For now, we should just remove `{GAC}` from the list as the safest fix.

Xamarin.Mac is already doing this:

f85556c1e5/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.props (L121-L125)

Down the road, we could specify only the paths needed for performance
reasons. We have done this recently in Xamarin.Android:

5945e9a779/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets (L382-L386)

* Added a test assertion for this as well.
2020-02-07 08:54:29 -06:00
..
Xamarin.Mac.Tasks [msbuild] Build the MSBuild task assemblies for netstandard2.0. (#7706) 2020-01-16 18:22:48 +01:00
Xamarin.Mac.Tasks.Core [msbuild] Don't add newlines to command line arguments to mmp. (#7806) 2020-02-06 15:34:21 +01:00
Xamarin.MacDev.Tasks [msbuild] Build the MSBuild task assemblies for netstandard2.0. (#7706) 2020-01-16 18:22:48 +01:00
Xamarin.MacDev.Tasks.Core [Localization] mtouch/mmp C# (#7710) 2020-01-31 15:02:52 -05:00
Xamarin.ObjcBinding.Tasks [msbuild] Remove support for XI/Classic. (#976) 2016-10-13 10:47:46 +02:00
Xamarin.Shared [d16-2] Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279) (#6361) 2019-06-19 17:28:01 +02:00
Xamarin.iOS.Tasks [msbuild] Build the MSBuild task assemblies for netstandard2.0. (#7706) 2020-01-16 18:22:48 +01:00
Xamarin.iOS.Tasks.Core [msbuild] remove {GAC} from $(AssemblySearchPaths) (#7815) 2020-02-07 08:54:29 -06:00
tests [msbuild] remove {GAC} from $(AssemblySearchPaths) (#7815) 2020-02-07 08:54:29 -06:00
.editorconfig Provide .editorconfig support for easier contributor formatting 2016-06-13 00:43:37 -03:00
.gitignore [msbuild] Convert project files to sdk-style project files. (#7698) 2020-01-14 08:16:02 +01:00
ILMerge.targets [msbuild] Make code a bit more future-proof. (#7790) 2020-02-05 07:29:29 +01:00
Makefile [msbuild] Build the MSBuild task assemblies for netstandard2.0. (#7706) 2020-01-16 18:22:48 +01:00
Xamarin.MacDev.Tasks.sln [msbuild] Build the MSBuild task assemblies for netstandard2.0. (#7706) 2020-01-16 18:22:48 +01:00