How to Create NuGet Packages From .Net Core RC2 Class Libraries

☆樱花仙子☆ 提交于 2019-11-30 08:42:58

Add this to your project.json file:

"scripts": {
  "postcompile": [
    "dotnet pack --no-build --configuration %compile:Configuration%"
  ]
}

This will run the dotnet pack command which will pack your build output produced after compilation into a NuGet package. For more info, see this.

I'm not sure how to only do this in release mode, so I've asked that question here.

UPDATE

Updated the answer based on the other question.

At this point, I don't believe there is an option to do this automatically in VS. You can look into using NuProj to do this if you like.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!