![]() |
VOOZH | about |
dotnet tool install --global NuGet.PackageSourceMapper --version 1.0.415202
dotnet new tool-manifestif you are setting up this repo
dotnet tool install --local NuGet.PackageSourceMapper --version 1.0.415202
#tool dotnet:?package=NuGet.PackageSourceMapper&version=1.0.415202
nuke :add-package NuGet.PackageSourceMapper --version 1.0.415202
This tool helps onboarding to package source mapping feature.
It can generate package source mapping section for you from nuget.config file and restored global packages folder.
Here is steps to use the tool. It works for both packagereference and packages.config type projects. Please note tool doesn't map packages in fallback folder since they don't get copied to global packages folder.
<config>
<add key="globalPackagesFolder" value="globalPackages" />
</config>
Preparation
global packages folder.Run this tool with options suitable for you. See examples below.
Copy generated nugetPackageSourceMapping.config file content into your nuget.config file. Please make any adjustments most sutiable for your use case.
Clear all local cache one more time to start on clean slate dotnet nuget locals all --clear
Repeat restore step above and make sure everything still works.
packagesourcemapper generate <CONFIGPATH> [-h|--help] [--verbosity <LEVEL>] [--fully-specified]
If no command is specified, the command will default to help.
generateGenerates packageSourceMapping section for nuget.config file.
CONFIGPATHSpecify path to nuget.config used for packagesourcemapper. This is positional argument so just value after generate command.
-h|--helpShow help information
--verbosity <LEVEL>Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. The default is minimal. For more information, see LoggerVerbosity.
--fully-specifiedSpecify this option to generate full specified pattern instead without prefix. Currently only packages starting with Microsoft, System, Runtime, Xunit are prefixed by default.
--remove-unused-sourcesSpecify this option if the packagesourcemapper should attempt to reduce the number of sources used in nuget.config by consolidating them.
Generate packageSourceMapping section:
PackageSourceMapper.exe generate C:\NuGetProj\NuGet.Client\NuGet.Config
PackageSourceMapper.exe generate C:\NuGetProj\NuGet.Client\NuGet.Config --verbosity diag
Generate packageSourceMapping section without any prefixing:
PackageSourceMapper.exe generate C:\NuGetProj\NuGet.Client\NuGet.Config --verbosity m --fully-specified
File NuGet.Client bugs in the NuGet/PackageSourceMapper
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.415202 | 7,986 | 3/7/2023 |
| 0.1.3-preview.22218.1 | 1,254 | 4/18/2022 |