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
[Bug]: With Package source mapping package get installed from not active source on PMUI for PR project #11236
Comments
@kartheekp-ms @aortiz-msft |
Can you please provide the exact repro steps? The reason is if the settings are modified after the solution has been loaded then new settings will not be still effective. AFAIK, this behavior is by design as of now for NuGet. |
@kartheekp-ms |
@erdembayar - Looking at the verbose logs, configuration and gif file I think the behavior is working as expected. The reason is, as per the source mapping configuration, the package
I unzipped your solution and followed below steps to reproduce issue.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="globalPackagesFolder" value="globalPackagesFolder" />
</config>
<packageSources>
<clear />
<add key="encyclopaedia" value="C:\Users\xxx\source\PublicRepository" />
<add key="encyclopædia" value="C:\Users\xxx\source\PrivateRepository" />
</packageSources>
<packageSourceMapping>
<packageSource key="encyclopaedia">
<package pattern="Contoso.*" />
<package pattern="测试更*" />
</packageSource>
<packageSource key="encyclopædia">
<package pattern="Contoso.MVC.*" />
</packageSource>
</packageSourceMapping>
</configuration>
Please let me know if I missed any step while reproducing this issue. If you are okay with the behavior please feel free to close this issue. |
By mistake I pressed |
But your current PMUI selection is not |
I agree. I copied the package to the both of the sources and selected
I changed the <?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="globalPackagesFolder" value="globalPackagesFolder" />
</config>
<packageSources>
<clear />
<add key="encyclopædia" value="C:\Users\xxx\source\PublicRepository" />
<add key="encyclopaedia" value="C:\Users\xxx\source\PrivateRepository" />
</packageSources>
<packageSourceMapping>
<packageSource key="encyclopaedia">
<package pattern="Contoso.*" />
<package pattern="测试更*" />
</packageSource>
<packageSource key="encyclopædia">
<package pattern="Contoso.MVC.*" />
</packageSource>
</packageSourceMapping>
</configuration> Clicked on
I even tried clearing global package folder, uninstall the package, change the source in PM UI to
|
Please try with following.
|
Changed the config file and followed repro steps mentioned in above comment. #11236 (comment) I still see the package installed from Let's sync-up offline to make sure I am following the correct repro steps. |
synced offline with @erdembayar. This behavior is expected now. Hence closing this issue. |
NuGet Product Used
Visual Studio Package Management UI
Product Version
n/a
Worked before?
n/a
Impact
It bothers me. A fix would be nice
Repro Steps & Context
I discovered this playing with localization. As you can see on video Contoso.MVC.ASP get installed from "encyclopaedia" repository even though that package was mapped to "encyclopædia".
Verbose Logs
Restoring packages for C:\NuGetProj\IssueRepro\11182\11182\11182.csproj...
Installed Contoso.MVC.ASP 1.0.0 from C:\xxxx\NamespaceTestPackages\PrivateRepository with content hash obFXJR2oXmb4gHYhVEDgbwwcu4IznlmJHzC06xLz9aNlyXET/DRbej47tlbWbpxADBpJAVV7yikQnadOAC9GrQ==.
Installing NuGet package Contoso.MVC.ASP 1.0.0.
Committing restore...
The text was updated successfully, but these errors were encountered: