Skip to content

Instantly share code, notes, and snippets.

@blair55
Created December 13, 2012 14:20
Show Gist options
  • Save blair55/4276660 to your computer and use it in GitHub Desktop.
Save blair55/4276660 to your computer and use it in GitHub Desktop.
ClickOnce Auto Update Application
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RootNamespace>AutoUpdater</RootNamespace>
<AssemblyName>AutoUpdater</AssemblyName>
<!-- begin include -->
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<IsWebBootstrapper>true</IsWebBootstrapper>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>true</UpdateRequired>
<ProductName>Auto Updater</ProductName>
<PublisherName>Blair55</PublisherName>
<ApplicationVersion>1.0.0.0</ApplicationVersion>
<BootstrapperEnabled>true</BootstrapperEnabled>
<!-- end include -->
</PropertyGroup>
</Project>
class Program
{
static void Main(string[] args)
{
var version = System.Reflection.Assembly.GetEntryAssembly().GetName().Version;
Console.WriteLine("I am now running the latest version:");
Console.WriteLine(version);
Console.ReadLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment