A NuGet Package that pads strings on the left.
Port of leftpad
This repo is just used as a demo of creating a local NuGet server for test purposes. You can manage NuGet package sources in Visual Studio or from the dotnet
CLI. Here are some example commands:
dotnet nuget add source c:\LocalNuget -n LocalNuget
NOTE: This will fail if the path already exists, so you can't point multiple sources to the same location even if they have different names.
List all sources:
dotnet nuget list source
Enable or disable a source by name:
dotnet nuget enable source LocalNuget
dotnet nuget disable source LocalNuget
Remove a source entirely:
dotnet nuget remove source LocalNuget
See the docs.
Modify the .csproj file to add NuGet specific properties. (see Ardalis.LeftPad.csproj)
For production releaes of packages you should always specify the Release configuration.
From the CLI:
dotnet pack -c Release
You can add -o [path]
to control where the output goes. For instance, -o .
will output the nupkg file in the current directory.
Publish to your LocalNuGet folder (either may work):
dotnet nuget push .\Ardalis.LeftPad.1.1.0.nupkg -s c:\LocalNuget
Note that your local package source should use a hierarchical folder structure. See local feeds docs for more info and utilities to create the structure.
If you're using the CLI command above, you can specify the subfolder as part of the feed:
dotnet nuget push .\Ardalis.LeftPad.1.1.0.nupkg -s c:\LocalNuget\Ardalis.LeftPad
It won't use subfolders otherwise, even if they already exist.
You can do this with a nuget.config
file. See here.