NuGet Product Used
MSBuild.exe
Product Version
.NET SDK:
Version: 10.0.301
Commit: 96856fd726
Workload version: 10.0.300-manifests.8c7d7c03
MSBuild version: 18.6.4+96856fd72
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.301\
Worked before?
No response
Impact
It's more difficult to complete my work
Repro Steps & Context
- Create two nuget feeds, e.g. in Azure DevOps, named something like
MyFeedA and MyFeedB
- Publish
MyPackage 1.0.0 to MyFeedA
- Publish
MyPackage 1.1.0 to MyFeedB (note: same name, different version, different feed)
- Create a new solution with
ProjectA and a directory nuget.config which clears existing package sources and only pulls from MyFeedA.
- Add a reference to
MyPackage 1.0.0 in ProjectA. Build in VS.
- Separate directory: create a new solution with
ProjectB and a directory nuget.config which clears existing package sources and only pulls from MyFeedB.
- Add a reference to
MyPackage 1.1.0 in ProjectB. Build in VS.
- Return to
ProjectA and update the version to 1.0.1. (note: this version doesn't exist, it's a way to trigger the particular error message through which I discovered this bug). Build in VS.
warning NU1603: ProjectA depends on MyPackage (>= 1.0.1) but MyPackage 1.0.1 was not found. MyPackage 1.1.0 was resolved instead.
The bug here is that it's resolved a package from a feed that it shouldn't consider or even be aware of. I'm wondering if the fundamental issue here is that locally cached nuget packages are not properly sorted/isolated by the feed?
Verbose Logs
NuGet Product Used
MSBuild.exe
Product Version
.NET SDK:
Version: 10.0.301
Commit: 96856fd726
Workload version: 10.0.300-manifests.8c7d7c03
MSBuild version: 18.6.4+96856fd72
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.301\
Worked before?
No response
Impact
It's more difficult to complete my work
Repro Steps & Context
MyFeedAandMyFeedBMyPackage 1.0.0toMyFeedAMyPackage 1.1.0toMyFeedB(note: same name, different version, different feed)ProjectAand a directorynuget.configwhich clears existing package sources and only pulls fromMyFeedA.MyPackage 1.0.0inProjectA. Build in VS.ProjectBand a directorynuget.configwhich clears existing package sources and only pulls fromMyFeedB.MyPackage 1.1.0inProjectB. Build in VS.ProjectAand update the version to1.0.1. (note: this version doesn't exist, it's a way to trigger the particular error message through which I discovered this bug). Build in VS.warning NU1603: ProjectA depends on MyPackage (>= 1.0.1) but MyPackage 1.0.1 was not found. MyPackage 1.1.0 was resolved instead.The bug here is that it's resolved a package from a feed that it shouldn't consider or even be aware of. I'm wondering if the fundamental issue here is that locally cached nuget packages are not properly sorted/isolated by the feed?
Verbose Logs