-
Notifications
You must be signed in to change notification settings - Fork 335
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 5.7 incompatible with VS 2019.8 #678
Comments
NuGet should be update to 5.8 in docker images to solve the problem. |
Verified this can repro with the following modifications to https://github.com/microsoft/dotnet-framework-docker/blob/d2b68d441d71df7615eeb8482419c2f975aa462e/samples/dotnetapp/Dockerfile: Change
Change
It produces the following error:
|
There are a couple things we should check when fixing this issue:
|
This applies to more than just an upgrade of NuGet 5.7 to 5.8. NuGet 5.7 is only installed in Server Core, version 2009/20H2. But the issue described here can occur on all currently supported Server Core versions which have a variety of NuGet versions installed. The reason they have different NuGet versions is because we've taken a conservative approach of changing the NuGet version in order to avoid any breaking changes. As each new version of Windows is released, we configure it to target the latest available NuGet version. So in reality, this is more than just upgrading NuGet 5.7 to 5.8. It's about upgrading all the NuGet versions across all our supported SDK images to NuGet 5.8. The earliest version that we'd have to consider is 4.9. That's the version that Server Core 2019 LTSC is configured to use which is the most used version of our images. I'm still in the process of tracking down whether there are any breaking changes that would exist with such an upgrade. |
I've gone through the list of DCRs in the release notes and haven't found any major breaking changes. I believe that normal NuGet CLI usage would continue to work. However, if there are dependencies directly on NuGet assemblies, consuming the API, there is the potential for breaking change. Most notably: NuGet/Home#7294. I'm thinking that we might want to proceed more cautiously before making this change for the December update. I'd like to discuss things first with the NuGet team and figure out an upgrade strategy with them. Then we can create a proper announcement ahead of time with our plans. In the mean time, the workaround would be to ensure that |
It is not a problem for me right now, but using |
If you make use of packages.config, you can use |
The latest set of images published as part of yesterday's Patch Tuesday release (#714) have included an additional version of nuget.exe (version 5.8) that is available from the following path: |
Looks like currently mcr.microsoft.com/dotnet/framework/sdk:4.8 includes msbuild from Visual Studio 2019 Update 8 and NuGet 5.7. They are not compatible with each other - attempt to build project with VS msbuild after restoring with NuGet will result in errors like:
error NETSDK1005: Assets file '...\obj\project.assets.json' doesn't have a target for '...'. Ensure that restore has run and that you have included '...' in the TargetFrameworks for your project.
The text was updated successfully, but these errors were encountered: