Open v-luzh opened 11 months ago
I'd also like to point out that the source "moved" from a "machine wide" package source, into the user's own nuget.config, which is not desirable. It might not have the same root cause as the duplicate issue, but if possible it would be nice to avoid if not too much extra work.
I am not able to edit the Name since the textbox field is correctly marked as readonly
.
I thought last week I was able to do this. Can someone help identify how to get into this situation? Perhaps there was a VS or a .NET Framework bug or something?
Hi @donnie-msft, the offline package source is read-only if it locates in "Machine-wide package sources:" section as your screenshot above [it seems a by-design scenario].
You can close VS, reopen the project again and reopen the "Options->NuGet Package Manager->Package Sources", and then you will find it go upstairs (in the "Package sources:" section as below). And you can modify the name now.
I think I understand the problem now, but let me know if anything below is inaccurate based on what you're seeing. I'm not blocked, but just wanted to point out some subtle clarifications and make sure you agree....
✅ Ok, I understand you better, now. I misunderstood the original screenshot with the cursor inside the readonly Name field, here:
So, I believe these are the key parts of your repro steps:
You can close VS, reopen the project again and reopen the "Options->NuGet Package Manager->Package Sources", and then you will find it go upstairs (in the "Package sources:" section as below).
I'm not seeing this happen when I follow your steps. I wonder if when you are selecting the machine-wide feed, are you actually unchecking the checkbox as well? Apparently, simply clicking the feed in the list by default unchecks the checkbox. This disables the package source.
You can check by looking at your applicable nuget.config for a disabledPackageSources
node containing "Microsoft Visual Studio Offline Packages".
Only when I disable the "Microsoft Visual Studio Offline Packages", by clicking on the machine-wide source list item (which unchecks the checkbox), does it seem to move up to become a regular package source.
Therefore, this bug appears to be with how VS Options is working with <disabledPackageSources>
in the nuget.config.
I'll see if I can find the bug. That's likely not a recent regression, but I'll update the thread once I know more.
From my %appdata%\NuGet\NuGet.Config
Hi @donnie-msft, thanks for your detailed verification. No, I didn't disable the machine-wide package source intentionally.
I think it is not related to the enabling/disabling this checkbox before modifying the Name in step4. I have verified these two scenarios, they both repro.
It still reproes on VS Main\35222.175 + NuGet Client Dev\6.12.0.82.
NuGet Product Used
Visual Studio Package Management UI
Product Version
Dev\6.9.0.45
Worked before?
It doesn’t repro on 17.6 (D17.6\34302.98) and 16.11 (D16.11\34301.259).
Impact
None
Repro Steps & Context
Repro Steps:
1.Create a C# Console App (.NET Core 8.0) project in VS and open the PM UI or PMC window.
2.Click the settings button (gear button) on PM UI or PMC window.
3.Click the NuGet Package Manager->Package Sources in the opened “Options” window. 4.Select the source “Microsoft Visual Studio Offline Packages” in the "Package sources" list -- not the one in "Machine-wide package sources:" section, modify the name in the “Name” textbox and click the OK button. 5.Click the settings button (gear button) on PM UI or PMC window and click the “Package Sources” node again.
Expected Results:
There should not be a duplicated package source in step5. Or the source “Microsoft Visual Studio Offline Packages” should not be modified in step4. The same source cannot be modified (as below screenshot) in the auto-created offline package source after deleting the default “nuget.config” file.
Actual Results:
There will be a duplicated package source as below screenshot.
Notes:
Repro rate: 100%.
Verbose Logs
No response