markdown 设置和部署nuget包

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 设置和部署nuget包相关的知识,希望对你有一定的参考价值。

1. Of course you will need VS (latest is the best)

2. Then, install `nuget.exe` by  
  2.1. Download nuget from [nuget](https://dist.nuget.org/win-x86-commandline/latest/nuget.exe)  
  2.2. Saving nuget.exe to suitable folder  
  2.3. Add to PATH environment variable like `C:\nuget`

3. Of course you need a library to publish, say `MyApp` (then there is a `MyApp.csproj` file at root directory)

4. Open cmd at root dir

5. Run the command below to create nuspec file

```
nuget spec MyApp.csproj
```

6. Update that nuspec file to match your release notes, pay attention in some required fields such as 

- licenseUrl
- projectUrl
- iconUrl
- releaseNotes
- tags

7. Create package with command

```
nuget pack
```

A package will be created, say `MyApp.1.0.0.nupkg`

8. Run command below to publish that package

```
nuget push <package>.nupkg <apikey> -Source https://api.nuget.org/v3/index.json
```

with  
 - \<package\> is your package name
 - \<apikey\> is your nuget api key

And done!

以上是关于markdown 设置和部署nuget包的主要内容,如果未能解决你的问题,请参考以下文章

markdown 恢复NuGet包

如何使用符号和源代码打包和部署 NuGet 包,以便调试器可以使用该源代码?

4.10使用NuGet包参考的插件不能正确部署

TFS内部部署无法从私有源恢复nuget包

无法卸载/重新安装 NuGet 包

如何调试从 TeamCity 部署的我的 nuget 包?