-
Notifications
You must be signed in to change notification settings - Fork 424
VS2015/VS2013 build broken when NuGet package is installed using VS2017.3 #467
Comments
The following is a minimal repro of a solution that builds fine in VS2017 but not in VS2013. |
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:
Same thing happens when creating a new .NET 4.6.1 console application in VS 2017 and adding a netstandard2.0 package (e.g. Heres the diagnostic log of the build: msbuild.log.zip cc @ericstj @dsplaisted - this is probably an sdk issue? |
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: dotnet/msbuild@40cd4d0 Indeed this is an SDK issue. |
Closing here as @dasMulli opened this in the SDK. (thanks!) |
OK, though still a bit stuck about how we'll help those VS2013 users :-( |
We're not stuck, we're just going to fix it in the repo that builds the component that has the problem. @oatkins please follow dotnet/sdk#1539. |
Maybe I misunderstood, but I thought that only helped with vs 2015, not 2013?
…Sent from my Windows 10 phone
From: Eric StJohn<mailto:notifications@github.com>
Sent: Friday, August 25, 2017 12:13 PM
To: dotnet/standard<mailto:standard@noreply.github.com>
Cc: Olly Atkins<mailto:oliverg_atkins@hotmail.com>; Mention<mailto:mention@noreply.github.com>
Subject: Re: [dotnet/standard] VS2015/VS2013 build broken when NuGet package is installed using VS2017.3 (#467)
We're not stuck, we're just going to fix it in the repo that builds the component that has the problem. @oatkins<https://github.com/oatkins> please follow dotnet/sdk#1539<dotnet/sdk#1539>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#467 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AKa26N-0HU9BOuC0M_ELVAZc9eRu3jDuks5sbvKygaJpZM4PAj6w>.
|
The SDK is what's delivering these targets to all versions of VS: 2013/2015/2017. The bug exists because the 2013/2015 msbuild targets didn't handle duplicates during the ImplicitlyExpandDesignTimeFacades target. The workaround here should work for both 2013/2015 and I expect the fix in the SDK to address both as well. |
Wonderful! Thank you.
…Sent from my Windows 10 phone
From: Eric StJohn<mailto:notifications@github.com>
Sent: Friday, August 25, 2017 1:14 PM
To: dotnet/standard<mailto:standard@noreply.github.com>
Cc: Olly Atkins<mailto:oliverg_atkins@hotmail.com>; Mention<mailto:mention@noreply.github.com>
Subject: Re: [dotnet/standard] VS2015/VS2013 build broken when NuGet package is installed using VS2017.3 (#467)
The SDK is what's delivering these targets to all versions of VS: 2013/2015/2017. The bug exists because the 2013/2015 msbuild targets didn't handle duplicates during the ImplicitlyExpandDesignTimeFacades target. The workaround here should work for both 2013/2015 and I expect the fix in the SDK to address both as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#467 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AKa26JNYPaJiWfbtcRPUGOVbY7JVSmq7ks5sbwBlgaJpZM4PAj6w>.
|
But I guess a nuget 2.* update would be necessary to know about the ns2.0 => net461 mapping? - at least if you want to add/update packages |
This is related to #454, but not exactly the same.
We have a large .NET 4.6.2 Windows desktop application with many developers. Some are using VS2017, but many are still on VS2015 or 2013. When a developer working in VS2017 adds a reference to the latest version of System.Collections.Immutable, the project can no longer be built by older versions of Visual Studio. We see many errors like:
Installing NETStandard.Library.NETFramework does resolve the problem, but since the package is marked as a preview, it causes other build warnings when we try to generate NuGet packages from our projects.
This leaves us with three options, none of which is very appealing:
Always add NuGet packages using VS2015. (We would prefer that developers do not need multiple versions of VS to be installed.)
Have all developers install VS2017, even if they continue to develop in VS2013. (They can't: they don't have licenses.)
Install the NETStandard.Library.NETFramework preview package in all our projects and try to find a way to suppress the warnings.
Am I missing any better alternative?
The text was updated successfully, but these errors were encountered: