With prior version of ASP.NET 5, class libraries automatically created NuGet packages on build. This no longer appears to be the case with RC2. Was that an intentional change? I don't see any posts about it in the announcements repo.
I'd like to know too. I know they removed the wrap command when dnx was replaced with dotnet. I'm not sure if that tooling change caused this to not be possible anymore?
now you can open a command prompt in the root of the project folder and type
dotnet pack -c Release
and that will generate the nuget for you
I don't know if there is supposed to be a gui way right now or not or if they will bring that back later
note also that there is no more artifacts folder, the /bin folder is back and that is where the nuget will be found after running the command
Need to generate nuget package after build , added following in project.json but does seems to be working any idea?
"scripts": {
"postbuild": "dotnet pack"
}
@jalalions Just today I was adding a prebuild option to my scripts in project.json for something else, and it didn't seem to work. I tried a simple "prebuild" : "echo Hello World!", but with no luck. So... I believe it's an issue with project.json. Try putting this in your .xproj just above the close of the </Project> tag.
<PropertyGroup>
<PostBuildEvent>
echo Building NuGet Package
dotnet pack ..
</PostBuildEvent>
</PropertyGroup>
I specify .. after dotnet pack, because my project.json is one file up from the bin folder (which is my default starting directory when the project builds).
@guardiannite Try precompile instead of prebuild ... and I'm inquiring on a schema change for project.json now, which shows (incorrectly) that prebuild/postbuild will work. https://github.com/dotnet/cli/issues/3338
This issue is being closed because it has not been updated in 3 months.
We apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate.
Most helpful comment
now you can open a command prompt in the root of the project folder and type
and that will generate the nuget for you
I don't know if there is supposed to be a gui way right now or not or if they will bring that back later
note also that there is no more artifacts folder, the /bin folder is back and that is where the nuget will be found after running the command