PackageSourceMapper 1.0.0-beta6

This is a prerelease version of PackageSourceMapper.
The specified version 1.0.0-beta7 was not found. You have been taken to version 1.0.0-beta6.
dotnet tool install --global PackageSourceMapper --version 1.0.0-beta6
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local PackageSourceMapper --version 1.0.0-beta6
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=PackageSourceMapper&version=1.0.0-beta6&prerelease
nuke :add-package PackageSourceMapper --version 1.0.0-beta6

NuGet Package Source Mapper tool

Synopsis

packagesourcemapper [command] [Options]

packagesourcemapper -h|--help

Description

This tool helps onboarding to package source mapping feature. It can generate package source mapping section for you, otherwise onboarding process could be quite time consuming. Here is steps to use the tool. Currently it only works for packagereference type projects.

  1. Declare a new global packages folder for your repo.
<config>
  <add key="globalPackagesFolder" value="globalPackages" />
</config>
  1. Clear all local cache dotnet nuget locals all --clear

  2. Do solution restore. Please run any prep scrips then please run it now. If you have any test or any other sub solutions please don't forget them too. If you happen to have packages restored in different folder due to sub project settings then please copy them to globalPackages too.

  3. Run this tool with options suitable for you.

  4. Copy generated nugetPackageSourceMapping.config file content into your nuget.config file. Please make any adjustments most sutiable for your use case.

  5. Clear all local cache one more time to start on clean slate dotnet nuget locals all --clear

  6. Repeat restore step above and make sure everything still works.

Options

-h|--help

Show help information

PackageSourceMapper.exe -h

PackageSourceMapper.exe generate -h

Commands

If no command is specified, the command will default to help.

generate

Generates packageSourceMapping section for nuget.config file.

Synopsis:
packagesourcemapper generate <CONFIGPATH> [-h|--help] [-dr|--detailedReport] [-dp|--disablePrecedenceOption] [-fs|--fullySpecifiedPatternOption]
Arguments:

CONFIGPATH

Specify path to nuget.config used for packagesourcemapper. This is positional argument so just value after generate command.

Options:

-h|--help

Show help information

--verbose

Specify this option to see more detailed log.

-p|--disable-precedence

Specify this option to disable ordering of sources (sources on top of list have more preference for resolving package, instead of original source it was downloaded) and make package to download from same source it was downloaded previously. Instead of sources, only rely on existing offline .nupkg.metadata to generate packageSourceMapping section.

-f|--fully-specified-pattern

Specify this option to generate full specified pattern instead without prefix.

Examples

With precedence from source availability:

PackageSourceMapper.exe generate C:\NuGetProj\NuGet.Client\NuGet.Config

With precedence from source availability and detailed report:

PackageSourceMapper.exe generate C:\NuGetProj\NuGet.Client\NuGet.Config --verbose

Just generate source mapping as it's based on meta data with fully specified:

PackageSourceMapper.exe generate C:\NuGetProj\NuGet.Client\NuGet.Config --verbose --disable-precedence --fully-specified-pattern

Just generate as it's based on meta data with prefix:

PackageSourceMapper.exe generate C:\NuGetProj\NuGet.Client\NuGet.Config --verbose --disable-precedence

Feedback

File NuGet.Client bugs in the NuGet/Home.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.0-beta6 0 11/9/2021
1.0.0-beta5 0 11/9/2021
1.0.0-beta4 0 11/9/2021
1.0.0-beta3 0 11/9/2021
1.0.0-beta2 0 11/9/2021
1.0.0-beta1 0 11/8/2021