I am trying to deploy to NuGet using a script. I have the following command for doing the actual deployment:
nuget pack MyProjection.csproj -Build -Properties Configuration=Release
Based the examples provided on NuGet's website, this is the correct command line. I noticed that some examples say -Prop
rather than -Properties
, but I don't think it matters.
However, NuGet outputs:
Attempting to build package from 'MyProject.csproj'.
Building project for target framework '.NETFramework,Version=v4.0'.
Packing files from 'C:\Users\...\MyProjection\bin\Debug'.
Using 'MyProject.nuspec' for metadata.
Successfully created package 'C:\Users\...\MyProject\MyProject.2.2.0.0.nupkg'.
Notice that it is packaging files in the Debug
folder instead of the Release
folder!
If I remove the -Build
setting, it grabs the files from the Release
like it's supposed to. The first question is: have I been publishing debug versions of my project? The second question is: how do I use these two command arguments together?
If I have to, I'll build the project using MSBuild.