Skip to content

Instantly share code, notes, and snippets.

@chamons
Created May 4, 2017 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chamons/3ad1634b2d453458c096382a77970f2b to your computer and use it in GitHub Desktop.
Save chamons/3ad1634b2d453458c096382a77970f2b to your computer and use it in GitHub Desktop.
Xamarin.Mac Project with
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
depends upon Roslyn:
<Reference Include="Microsoft.CodeAnalysis">
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.2.1.0\lib\netstandard1.3\Microsoft.CodeAnalysis.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CodeAnalysis.CSharp">
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.2.1.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
</Reference>
which pulls in facade nugets:
<Reference Include="System.ValueTuple">
<HintPath>..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
</Reference>
Since we are using a HintPath (like all nugets), msbuild resolve to the nuget facade:
/Users/donblas/Downloads/TestRoslynApp/packages/System.ValueTuple.4.3.0/lib/netstandard1.0/System.ValueTuple.dll
instead of
/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/4.5/Facades/System.ValueTuple.dll
However during launch we refuse to load it:
2017-05-04 13:34:53.513 Test Roslyn App[12499:2869918] info: Denying load of problematic image /Users/brajkovic/Projects/TestRoslynApp/TestRoslynApp/bin/Debug/Test Roslyn App.app/Contents/MonoBundle/System.ValueTuple.dll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment