VS 2015 support for ns2.0 causes conflicts with ref assembly facades
See original GitHub issueMoving this out from https://github.com/dotnet/standard/issues/467#issuecomment-324471572
–
For Visual Studio 2015 there is a NuGet 3.6.0 VSIX at https://www.nuget.org/downloads that tells me to download the VS 2015 support from https://download.microsoft.com/download/0/F/D/0FD852A4-7EA1-4E2A-983A-0484AC19B92C/dotnet-standard-support-vs2015-2.0.0-win-x86.msi (though via an aka.ms link that I now no longer have in my clipboard)
However, giving this a try on that solution yields compile errors for conflicting references like this:
CSC : error CS1703: Multiple assemblies with equivalent identity have been imported: 'C:\Program Files (x86)\MSBuild\Microsoft\Microsoft.NET.Build.
Extensions\net461\ref\System.Xml.XmlSerializer.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades
\System.Xml.XmlSerializer.dll'. Remove one of the duplicate references. [C:\Users\martin.ullrich\Downloads\TestNetStandardNugetPackage\TestNetStandar
dNugetPackage\TestNetStandardNugetPackage.csproj]
Same thing happens when creating a new .NET 4.6.1 console application in VS 2017 and adding a netstandard2.0 package (e.g. Microsoft.Extensions.Logging.Console).
Heres the diagnostic log of the build: msbuild.log.zip
cc @ericstj @dsplaisted - this is probably an sdk issue?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:10 (5 by maintainers)
Top GitHub Comments
I didn’t know how to set ImplicitlyExpandDesignTimeFacades=false, so adding this for others who arrive here and need help.
You need to add
<ImplicitlyExpandDesignTimeFacades>false</ImplicitlyExpandDesignTimeFacades>
to aPropertyGroup
in your.csproj
file. This StackOverflow answer shows the final result.From @ericstj
It looks like MSBuild is still adding the facades from the targeting pack. I haven’t chased down the diff yet, but you should be able to workaround by setting ImplicitlyExpandDesignTimeFacades=false.
I believe the diff is this: https://github.com/Microsoft/msbuild/commit/40cd4d090dfebddd5417bc4e976feebc081a02ed
Indeed this is an SDK issue.