1
Vote

Nuget OutputDirectory trailing slash

description

If I pass path in brackets with training slash to -OutputDirectory switch of nuget pack command, following swtiches are ignored.

For example:
this command works:
nuget.exe pack "C:\Builds\1\PROJECT\RollingBuild\src\Dev\Backend\Contracts\Contracts.csproj.nuspec" -Version 0.1.0.1407 -OutputDirectory "C:\Builds\1\PROJECT\RollingBuild\src\Dev\bin\Packages" -prop OutDir=C:\Builds\1\PROJECT\RollingBuild\src\Dev\bin\
but this command throws: The replacement token 'OutDir' has no value. (.nuspec uses $OutDir$ replacement token)
nuget.exe pack "C:\Builds\1\PROJECT\RollingBuild\src\Dev\Backend\Contracts\Contracts.csproj.nuspec" -Version 0.1.0.1407 -OutputDirectory "C:\Builds\1\PROJECT\RollingBuild\src\Dev\bin\Packages\" -prop OutDir=C:\Builds\1\PROJECT\RollingBuild\src\Dev\bin\
difference is in -OutputDirectory:

"C:\Builds\1\PROJECT\RollingBuild\src\Dev\bin\Packages\" - error
"C:\Builds\1\PROJECT\RollingBuild\src\Dev\bin\Packages" ok
C:\Builds\1\PROJECT\RollingBuild\src\Dev\bin\Packages\ - ok
C:\Builds\1\PROJECT\RollingBuild\src\Dev\bin\Packages - ok

In general, I was not able to automate nuget pack and nuget post in folders containing space and with nuget.exe where path contains space.

I'm using latest 3.3.0

comments