Publish a Nuget package to your own server

Possibly save 1 hour of your time:

1. Download Nuget and set environment variables path where the nuget.exe is found

2. Open command prompt and cd to the .csproj folder.

Run the following command to create a nuget specification template.

nuget spec

3. Open command prompt. Then change directory to go to the folder where the YourProjectName.csproj is. Then enter the following to package your csproj.

    nuget pack YourProjectName.csproj

Next, you will push this to your server location

    nuget push YourProjectName.1.0.0.0.nupkg -Source \\serverLocation

The version number is based on your assembly info file.

Resource Link:

https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package

 

 

Advertisements