Skip to content

Error when deploying under windows if the folder path contains spaces. #3

@yurygolub

Description

@yurygolub

I'm trying to build windows setup, but I'm getting an error. Looks like spaces in the path to PostPublish.bat cause it.

d:\Path to folder\PupNet-HelloWorld>dotnet tool run pupnet --kind setup
PupNet Deploy 1.5.0
Configuration: HelloWorld.pupnet.conf

============================================================
APPLICATION: HelloWorld 1.0.3 [1]
============================================================

AppBaseName: HelloWorld
AppId: zone.kuiper.helloworld
AppVersion: 1.0.3
PackageRelease: 1
StartCommand: helloworld
SetupCommandPrompt: Command Prompt

============================================================
OUTPUT: SETUP
============================================================

PackageKind: Setup
Runtime: win-x64
Arch: Auto (x64)
Build: Release
OutputName: HelloWorld.x64.exe
OutputDirectory: d:\Path to folder\PupNet-HelloWorld\Deploy/bin

============================================================
BUILD PROJECT: PupNet-HelloWorld
============================================================

dotnet publish "d:\Path to folder\PupNet-HelloWorld" -r win-x64 -c Release -p:Version=1.0.3 --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "C:\Users\User\AppData\Local\Temp\KuiperZone.PupNet\zone.kuiper.helloworld-win-x64-Release-Setup\AppDir\Publish"

d:\Path to folder\PupNet-HelloWorld\Deploy/PostPublish.bat

============================================================
BUILD PACKAGE: HelloWorld.x64.exe
============================================================

iscc /O"d:\Path to folder\PupNet-HelloWorld\Deploy/bin" "C:\Users\User\AppData\Local\Temp\KuiperZone.PupNet\zone.kuiper.helloworld-win-x64-Release-Setup\HelloWorld.iss"

============================================================
ISSUES
============================================================

NONE

Continue? [N/y]: Y
Remove: . ... OK
Create Directory: . ... OK
Create Directory: AppDir ... OK
Create Directory: AppDir\Publish ... OK
Create File: AppDir\Publish\helloworld.bat ... OK
Create File: AppDir\Publish\CommandPrompt.bat ... OK

Building Project ...
cmd /C dotnet publish "d:\Path to folder\PupNet-HelloWorld" -r win-x64 -c Release -p:Version=1.0.3 --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "C:\Users\User\AppData\Local\Temp\KuiperZone.PupNet\zone.kuiper.helloworld-win-x64-Release-Setup\AppDir\Publish"
MSBuild version 17.6.1+8ffc3fe3d for .NET
  Determining projects to restore...
  Restored d:\Path to folder\PupNet-HelloWorld\HelloWorld\HelloWorld.csproj (in 83 ms).
C:\Program Files\dotnet\sdk\7.0.302\Current\SolutionFile\ImportAfter\Microsoft.NET.Sdk.Solution.targets(36,5): warning NETSDK1194: The "--output" option isn't supported when building a solution. Specifying a solution-level output path results in all projects copying outputs to the same directory, which can lead to inconsistent builds. [d:\Path to folder\PupNet-HelloWorld\HelloWorld.sln]
  HelloWorld -> d:\Path to folder\PupNet-HelloWorld\HelloWorld\bin\Release\net6.0\win-x64\HelloWorld.dll
  HelloWorld -> C:\Users\User\AppData\Local\Temp\KuiperZone.PupNet\zone.kuiper.helloworld-win-x64-Release-Setup\AppDir\Publish\

cmd /C d:\Path to folder\PupNet-HelloWorld\Deploy/PostPublish.bat
'd:\Path' is not recognized as an internal or external command,
operable program or batch file.

FAILED
cmd returned non-zero exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions