release - NuGet pack Ignoring -Prop Arguments When -Build Specified -
i trying deploy nuget using script. have next command doing actual deployment:
nuget pack myprojection.csproj -build -properties configuration=release
based examples provided on nuget's website, right command line. noticed examples -prop
rather -properties
, don't think matters.
however, nuget outputs:
attempting build bundle 'myproject.csproj'. building project target framework '.netframework,version=v4.0'. packing files 'c:\users\...\myprojection\bin\debug'. using 'myproject.nuspec' metadata. created bundle 'c:\users\...\myproject\myproject.2.2.0.0.nupkg'.
notice packaging files in debug
folder instead of release
folder!
if remove -build
setting, grabs files release
it's supposed to. first question is: have been publishing debug versions of project? sec question is: how utilize these 2 command arguments together?
if have to, i'll build project using msbuild.
when packing project, nuget utilize current project settings, ignoring configuration alternative passed command line. same go basepath argument, instance.
if alter default configuration release, nuget build bundle using release bits. next in .csproj:
<propertygroup> <configuration condition=" '$(configuration)' == '' ">debug</configuration>
and alter to:
<propertygroup> <configuration condition=" '$(configuration)' == '' ">release</configuration>
build-automation release nuget
No comments:
Post a Comment