Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do you publish a clickonce installer that includes .net installer and Auto-Update functionality?
    primarykey
    data
    text
    <p>I am using TeamCity for a continuous integration server and am deploying my application using a ClickOnce installer. I can get the installer to function and deploy my application but I cannot figure out how to include the installer for .net 4.5 if the computer does not already have it installed or how to enable the auto-update check feature in ClickOnce deployments. I am currently using the MSBuild file below to build my installer</p> <pre><code>&lt;Project DefaultTargets="DoPublish" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; &lt;Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/&gt; &lt;PropertyGroup&gt; &lt;Version&gt;$(BUILD_NUMBER)&lt;/Version&gt; &lt;Install&gt;true&lt;/Install&gt; &lt;InstallFrom&gt;Unc&lt;/InstallFrom&gt; &lt;UpdateEnabled&gt;true&lt;/UpdateEnabled&gt; &lt;UpdateMode&gt;Background&lt;/UpdateMode&gt; &lt;ClickOnceBuildDirectory&gt;$(MSBuildProjectDirectory)\MyProject\bin\$(Configuration)\app.publish&lt;/ClickOnceBuildDirectory&gt; &lt;ClickOnceInstallDirectory&gt;$(MSBuildProjectDirectory)\Publish&lt;/ClickOnceInstallDirectory&gt; &lt;ClickOnceFinalLocation&gt;$(env_PublishUrl)&lt;/ClickOnceFinalLocation&gt; &lt;/PropertyGroup&gt; &lt;Target Name="DoPublish"&gt; &lt;RemoveDir Directories="$(ClickOnceInstallDirectory)" ContinueOnError="true" /&gt; &lt;MSBuild Projects="MyProject.sln" Targets="Clean;Build" Properties="ApplicationVersion=$(Version);Configuration=$(Configuration)"/&gt; &lt;MSBuild Projects="MyProject\MyProject.csproj" Targets="Publish" Properties="ApplicationVersion=$(Version);Configuration=$(Configuration);InstallUrl=$(ClickOnceFinalLocation)" /&gt; &lt;MakeDir Directories="$(ClickOnceInstallDirectory)"/&gt; &lt;Exec Command="xcopy /E $(ClickOnceBuildDirectory) $(ClickOnceInstallDirectory)" /&gt; &lt;/Target&gt; &lt;/Project&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload