Reputation: 162
I am using the following command to publish my application for ClickOnce:
D:\Builds\Client.App>"C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe" /m "Client\Client.csproj" /target:publish /property:VisualStudioVersion=14.0;ApplicationVersion=%version%;OutputPath="Client\bin\Release"
This ends up creating the expected files, but in this path:
D:\Builds\Client.App\Client\bin\Releaseapp.publish
Notice the lack of path separator before the "app.publish"?
I've tried specifying the "PublishUrl" on the command line also, to no avail:
D:\Builds\Client.App>"C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe" /m "Client\Client.csproj" /target:publish /property:Configuration=Release;Platform="Any CPU";VisualStudioVersion=14.0;ApplicationVersion=%version%;OutputPath="%cd%\Client\bin\Release";PublishUrl="%cd%\Client\bin\Release\app.publish"
I have used the %cd% in order to ensure that relative paths aren't being used.
Upvotes: 2
Views: 2880
Reputation: 1494
Just add another slash after \Release
D:\Builds\Client.App>"C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe" /m "Client\Client.csproj" /target:publish /property:VisualStudioVersion=14.0;ApplicationVersion=%version%;OutputPath="Client\bin\Release\"
If that doesn't work then you can use PublishDir property to explicitly specify the final clickonce output folder (msbuild would only append the default 'app.publish' folder to OutputRoot if PublishDir is not set).
Upvotes: 1