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


I have a Windows application in my solution in csproj, and I want to publish the use of the command line (bat, CMD) .

My script is (I enter \ r \ n for better reading):

  SET MSBUILD = "% SystemRoot% \ Microsoft \ .NET \ Framework \ V3.5 \ MSBuild.exe "SET CARWIN =" .. \ .. \ Security.CarWin.csproj "% msbuild %% Reset msbild to publish target: rebuild;% CARWIN% / p: Publication Application Version 1.0.0.0 Publish "/ P: Configuration = Release / P: PublicRL =" C: \ ClickOn \ Carvin. WebInstall \ PublicKion \ "/ P: InstallLow =" http: // Desever / CarvinCliconus / Pbassacin / "/ P: Publisher's Speech =" C: \ ClickOnce \ CarWin.WebInstall \ Publicacion \ " 

Note: I will also try to use / target: publish

but in the path PublishDir or PublishUrl (C: \ ClickOnce \ CarWin.WebInstall \ Publicacion) any file .

I have seen many posts on this site and Google but I have not found any solution.

View basically the PublishUrl command is not taken into account when running ClickOnce from the command line but you can easily add behavior with an additional MSBuild-task.

I An additional MSBuild-file is created, for example build.csproj contains a published task . This function first calls the regular MS-build of the target-project Later this result was found in the publication directory Ilipi makes now I urge instead of file-project reguar the command line 'build.csproj':

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Project Toolwarsen = "3.5" Default Target = "Publish" xmlns = "http://schemas.microsoft.com/developer/msbuild/2003" & gt; & Lt; PropertyGroup & gt; & Lt ;! - Project name - & gt; & Lt; ProjectName & gt; MyExampleProject & lt; / ProjectName & gt; & Lt ;! - Properties of Project-Build - & gt; & Lt; DefaultBuildProperties & gt; Configuration = Release & lt; / DefaultBuildProperties & gt; & Lt ;! - Click-once the location of the goods, relative to the project - & gt; & Lt; ProjectPublishLocation & gt; \ Bin \ release \ app.publish & lt; / ProjectPublishLocation & gt; & Lt ;! - You want to copy click-one-deployment. Here's a window share - & gt; & Lt; ProjectClickOnceFolder & gt; \\ TargetServer \ deployment & lt; / ProjectClickOnceFolder & gt; & Lt; / PropertyGroup & gt; & Lt; Target name = "publish" DependsOnTargets = "clean" & gt; & Lt; Message text = "$ (ApplicationRevision) to not start build-build" /> & Lt ;! - Original project creation - & gt; & Lt; MSBuild Projects = "./$ (ProjectName) .csproj" Properties = "$ (DefaultBuildProperties)" Target = "Publish" /> & Lt ;! - Define the required files for once click - & gt; & Lt; ItemGroup & gt; & Lt; Include SetupFiles = "$ (ProjectPublishLocation) \ *. *" / & Gt; & Lt; Include UpdateFiles = "$ (ProjectPublishLocation) \ Application Files \ ** \ *. *" / " & Lt; / ItemGroup & gt; & Lt ;! - and copy them - & gt; & Lt; Copy SourceFiles = "@ (SetupFiles)" destinationfolder = "$ (ProjectClickOnceFolder) \" /> & Lt; Copy source files = "@ (updates files)" destinationfolder = "$ (projectclick on folder) \ application files \% (recursive diam)" /> & Lt; / Target & gt; & Lt; Target name = "clean"> & Lt; Message text = "clean project" /> & Lt; MSBuild Projects = "./$ (ProjectName) .csproj" property = "$ (DefaultBuildProperties)" target = "clean" /> & Lt; / Target & gt; & Lt; / Project & gt;  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -