Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
713 views
in Technique[技术] by (71.8m points)

clickonce - Problems using MsBuild using command line for Publish Click Once

I have Windows application in csproj in my solution, and I want generate Publish using command line (bat, cmd).

My script is (I put for better reading):

 SET MSBUILD="%SystemRoot%Microsoft.NETFrameworkv3.5MSBuild.exe"
    SET CARWIN="....Security.CarWin.csproj"

    rem msbuild para publish

    %MSBUILD% /target:rebuild;publish %CARWIN% 
/p:ApplicationVersion="1.0.0.0" 
/p:Configuration=release 
/p:PublishUrl="C:ClickOnceCarWin.WebInstallPublicacion" 
/p:InstallUrl="http://desserver/carwinclickonce/Publicacion/" 
/p:PublishDir="C:ClickOnceCarWin.WebInstallPublicacion" 

note: I'll try too using /target:publish

But in path PublishDir or PublishUrl (C:ClickOnceCarWin.WebInstallPublicacion) not generates any files.

I have seen many posts in this site and google but I not found any solution.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Use PublishDir instead of PublishUrl when running from command line.

msbuild /target:publish /p:Configuration=Release;PublishDir=c:playground

You can also change version, like ApplicationRevision=666;MinimumRequiredVersion=1.1


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...