-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuget package install and update fails for Unity target projects with new csproj format even though PackageTargetFallback is specified #5460
Comments
This may be fixed by #5154 |
I'm not finding a combination that works. Note: In all of these tests, I kept the rest of the above attached csproj unchanged and only changed the Test 1 <TargetFramework>.NETFramework,Version=v3.5,Profile=Unity Full v3.5</TargetFramework>
Test 2 <TargetFramework>.NETFramework,Version=v3.5,Profile=Unity Full v3.5</TargetFramework>
- <PackageTargetFallback>$(PackageTargetFallback);net35</PackageTargetFallback>
Test 3 <TargetFramework>net35-unity full v3.5</TargetFramework>
Test 4 <TargetFramework>net35</TargetFramework>
|
This issue just got a lot worse after we installed Visual Studio 2017 version 15.3 and .Net Core 2.0 SDK. After that install, Visual Studio will no longer restore NuGet packages. We get the error...
Previously this issue only broke NuGet package installs, but now it breaks for installs and restores. @emgarten can we get #5154 in sooner? Or can we get a quicker fix by making a change to allow spaces in profile names? |
I've moved this to the backlog for consideration. I think #5154 is a good approach to fix this. Alternatively NuGet.Frameworks could add an alias for the unity profile so that it can be written as |
Because this flow was so interruptive to our developers, we have since given up on attempting to target the Unity profile. As a workaround, we now target .Net 3.5 Full. This allows us to function without error with NuGet. Though, this is not an ideal workaround. We now run the risk of potentially getting runtime errors because we can no longer catch unsupported framework errors at compile time. |
@tylerohlsen thanks for the update. We're looking into giving unity first class support in nuget to improve this. |
Closing this as stale right now. #5154 is a generic feature that can still be worked on. |
Details about Problem
I have a VS 2017 project with the new csproj format. See file contents attached. Notice I have added the new PackageTargetFallback node to allow VS to allow .Net 3.5 packages to be installed.
If I manually enter a package reference to a package that contains a .Net 3.5 target, the package restore succeeds and all is well. (see NLog in example file)
If I attempt to use the VS 2017 Manage Nuget Packages UI or Package Manager Console or dotnet CLI to install or update the package, I get the below error.
Note: This same issue has been reported to the Visual Studio Developer Community here.
NuGet product used:
NuGet version:
Worked before? If so, with which NuGet version:
Detailed repro steps so we can see the same problem
<PackageTargetFallback>$(PackageTargetFallback);net35</PackageTargetFallback>
All methods produce the same below error and stack trace
Verbose Logs
Sample Project
UnityNuGet.zip
The text was updated successfully, but these errors were encountered: