-
Notifications
You must be signed in to change notification settings - Fork 258
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
[source mapping] Having a duplicate source breaks msbuild sdks restore #13471
Comments
/cc @nkolev92 & @donnie-msft related to #13469 |
What would you have expected to happen @jeromelaban compared to what the error message tells you today. (we have ideas ourselves, but don't want to lead you towards those :D ) |
In itself, the message is does not feel easily actionable. Knowing the cause, I'd intuitively say that it should fail/warn earlier because the source mapping got overridden. Also, maybe displaying all the known sources would have told that none of the available ones were considered? |
Today it says:
A more powerful message would be to say "no sources" were considered potentially, because the package is not mapped. |
Both messages would help for sure. Another problem I see here is that the user for unoplatform/uno#16758 (reply in thread) stumbled on this issue had a lot of mappings defined at the user level. It feels like an incorrect use of the source mapping feature, as it forces any new package use to be added to the the mapping list (with errors like #13469). This situation is what led to this particular issue. |
I wonder if my rough proposal in #13173 to have NuGet tooling able to create configs that |
I was also hitting this issue, getting errors such as
and
I managed to work around this issue by modifying my |
NuGet Product Used
dotnet.exe, Visual Studio Package Management UI
Product Version
8.0.300
Worked before?
unknown
Impact
Other
Repro Steps & Context
dotnet nuget locals all -c
dotnet new classlib -o test01
test01.csproj
sdk to beSdk="MSTest.Sdk/3.3.1"
%appdata%\NuGet\NuGet.Config
. add the following mapping:test01
folder, create anuget.config
file:classlib01
, rundotnet restore
Notice that if the custom
nuget.config
file added in the project folder is removed or the duplicate nuget.org source is removed, the restore succeeds.Verbose Logs
The text was updated successfully, but these errors were encountered: