I am trying to install NuGet using a script. I have the following command for actual deployment:
nuget pack MyProjection.csproj -Build -Properties Configuration=Release
For the examples presented on the NuGet website, this is the correct command line. I noticed that some examples say -Prop and not -Properties , but I don't think that matters.
However, the output of NuGet:
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'.
Please note that this is packing the files in the Debug folder instead of the Release folder!
If I remove the -Build , it captures the files from Release as intended. First question: did I publish debug versions of my project? Second question: how can I use these two command arguments?
If I need, I will create a project using MSBuild.
source share