Skip to content

A NuGet Package that pads strings on the left.

License

Notifications You must be signed in to change notification settings

ardalis/LeftPad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeftPad

A NuGet Package that pads strings on the left.

Port of leftpad

Using a Local NuGet Server

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

Creating and Publishing a Simple NuGet Package

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.

What about different package sources per solution?

You can do this with a nuget.config file. See here.

About

A NuGet Package that pads strings on the left.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages