Creating nuspec file
Go to the path with the .csproj
file
Run the following command:
nuget spec
Filling out assembly info
Open the .nuspec
file and fill in fields or delete lines not needed. Leave the id line as is.
Creating .nupkg
file
Run the following command:
nuget pack YOUR_PROJECT.csproj -MsBuildPath "C:\Program Files (x86)\MSBuild\14.0\Bin" -Properties Configuration=Release -OutputDirectory "./artifacts/"
In dotnet core use:
dotnet pack YOUR_PROJECT.csproj -o ../artifacts
Pushing your changes to the nuget server
Run the following command
nuget push ./artifacts/YOUR_PROJECT_VERSION_PACKAGE.nupkg -Source https://your/feed
dotnet nuget push ./artifacts/YOUR_PROJECT_VERSION_PACKAGE.nupkg --source https://your/feed
Alternate
Run dotnet msbuild .\YOUR_PROJECT.csproj
nuget push ./bin/release/YOUR_PROJECT_VERSION_PACKAGE.nupkg -Source https://your/feed