question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VS 2015 support for ns2.0 causes conflicts with ref assembly facades

See original GitHub issue

Moving 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:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

12reactions
MariusVolkhartcommented, Feb 2, 2018

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 a PropertyGroup in your .csproj file. This StackOverflow answer shows the final result.

4reactions
dasMullicommented, Aug 25, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS2015/VS2013 build broken when NuGet package is ...
Some are using VS2017, but many are still on VS2015 or 2013. ... VS 2015 support for ns2.0 causes conflicts with ref assembly...
Read more >
VS 2015 support for ns2.0 causes conflicts with ref assembly ...
VS 2015 support for ns2.0 causes conflicts with ref assembly facades. ... For Visual Studio 2015 there is a NuGet 3.6.0 VSIX at ......
Read more >
MSB3277: Found conflicts between different versions of ' ...
This error occurs during a build when more than one version of the same dependent assembly is referenced in a build of the...
Read more >
Warning: Found conflicts between different versions of the ...
This warning means that two projects reference the same assembly (e.g. System.Windows.Forms ) but the two projects require different ...
Read more >
Found conflicts between different versions of the same ...
This is incorrect (or at least it was for some versions of Visual Studio - it seems to be OK on an up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found