Open xPaw opened 2 years ago
I agree that error message could be improved by adding package dependency path. One option that I can think of right now is, look at the package dependencies in either project.assets.json
file or depedencies node in VS solution explorer.
NU1701 used to be a warning and is still documented so. I wonder if there's any update that's elevated it to an error recently?
Another related issue on dotnet SDK https://github.com/dotnet/sdk/issues/25338, which upgraded Nuget dependency from 6.1.x to 6.2.x. The issue also surfaced as error NU1701
--
Correction -- NU1701 are still warnings. We have <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
set on our project, and that's why it was surfaced as errors
I wonder if there's any update that's elevated it to an error recently?
I had warnings as errors in my csproj.
UPDATE: we resolved the issue by removing all the incompatible transitive dependencies. After that, we no longer have NU1701 warnings. This sample project explains why NU1701 wasn't reported before, and why it got surfaced out since Nuget 6.2
This issue is about making the warning more informative, not resolving it.
NuGet Product Used
dotnet.exe
Product Version
6.1.0.103
Worked before?
No response
Impact
It bothers me. A fix would be nice
Repro Steps & Context
dotnet restore
and nuget in Visual Studio 2022.In my project I have
SkiaSharp.Views.WindowsForms
package, which depends on OpenTK (>= 3.1.0), OpenTK.GLControl (>= 3.1.0).My project itself also depended on OpenTK.GLControl, while attempting an upgrade I briefly uninstalled this package, but nuget keeps saying that it fails to restore it.
It's not obvious that it's still trying to restore it because another package depends on it. This error message should print the dependency path.
Verbose Logs
GUI.csproj
does not have a reference to this package directly.