From 16f0d958cfb5fa2d7b36df82828181731e213a28 Mon Sep 17 00:00:00 2001 From: Biarity Date: Sun, 28 Jan 2018 09:40:49 +1000 Subject: [PATCH] Added nuget publishing notes --- publishing_to_nuget.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 publishing_to_nuget.md diff --git a/publishing_to_nuget.md b/publishing_to_nuget.md new file mode 100644 index 0000000..4038e9a --- /dev/null +++ b/publishing_to_nuget.md @@ -0,0 +1,17 @@ +### 1. Pack: +``` +dotnet pack Sieve.csproj -c Release -o . /p:PackageVersion=1.2.0 +``` +Don't forget to change version since nuget packages are immutable. + +### 2. Manually add nuspec: +For some reason `dotnet pack` chooses to ignore my Sieve.nuspec. +So unpack the Sieve.1.2.0.nupkg, and replace the nuspec in there with the local one. +Don't forget that if you add new dependencies, you'll need to declare them in the nuspec. + +### 3. Publish: +``` +nuget push Sieve.1.2.0.nupkg API_KEY -Source https://api.nuget.org/v3/index.json +``` +Replace API_KEY with one you get from nuget's website. +Also don't forget to replace corresponding version. \ No newline at end of file