Last active
December 25, 2020 00:08
-
-
Save ctaggart/21ff8e23b82e3408ee8dc6108beb1de7 to your computer and use it in GitHub Desktop.
ClickOnce for Rust Apps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
msbuild $PSScriptRoot /t:Restore,Publish /v:m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<PropertyGroup> | |
<InstallUrl>https://ctaggart.github.io/minesweeper-rs/</InstallUrl> | |
<ManifestCertificateThumbprint>1A92BF20220B301077205787F406B1BCEE6DA97E</ManifestCertificateThumbprint> | |
</PropertyGroup> | |
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<PropertyGroup> | |
<ApplicationRevision>0</ApplicationRevision> | |
<ApplicationVersion>0.1.0.*</ApplicationVersion> | |
<BootstrapperEnabled>True</BootstrapperEnabled> | |
<Configuration>Release</Configuration> | |
<CreateDesktopShortcut>True</CreateDesktopShortcut> | |
<GenerateManifests>True</GenerateManifests> | |
<Install>true</Install> | |
<InstallFrom>Web</InstallFrom> | |
<IsRevisionIncremented>True</IsRevisionIncremented> | |
<IsWebBootstrapper>True</IsWebBootstrapper> | |
<MapFileExtensions>true</MapFileExtensions> | |
<OpenBrowserOnPublish>false</OpenBrowserOnPublish> | |
<Platform>Any CPU</Platform> | |
<PublishDir>bin\publish\</PublishDir> | |
<PublishUrl>bin\publish\</PublishUrl> | |
<PublishProtocol>ClickOnce</PublishProtocol> | |
<PublishReadyToRun>False</PublishReadyToRun> | |
<PublishSingleFile>False</PublishSingleFile> | |
<SelfContained>False</SelfContained> | |
<SignatureAlgorithm>sha256RSA</SignatureAlgorithm> | |
<SignManifests>True</SignManifests> | |
<TargetFramework>net5.0-windows</TargetFramework> | |
<UpdateEnabled>True</UpdateEnabled> | |
<UpdateMode>Foreground</UpdateMode> | |
</PropertyGroup> | |
<ItemGroup> | |
<BootstrapperPackage Include="Microsoft.NetCore.DesktopRuntime.5.0.x64"> | |
<Install>true</Install> | |
<ProductName>.NET Desktop Runtime 5.0.1 (x64)</ProductName> | |
</BootstrapperPackage> | |
</ItemGroup> | |
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>WinExe</OutputType> | |
<TargetFramework>net5.0-windows</TargetFramework> | |
<UseWindowsForms>true</UseWindowsForms> | |
<Configuration>Release</Configuration> | |
<PublishProfile>ClickOnceProfile</PublishProfile> | |
<ApplicationIcon>Square44x44Logo.ico</ApplicationIcon> | |
</PropertyGroup> | |
<ItemGroup> | |
<Content Include="..\target\release\minesweeper-rs.exe"> | |
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | |
</Content> | |
</ItemGroup> | |
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Windows.Forms; | |
namespace WindowsFormsApp1 | |
{ | |
static class Program | |
{ | |
static void Main() | |
{ | |
try | |
{ | |
Process.Start(new ProcessStartInfo { CreateNoWindow = true, FileName = "minesweeper-rs.exe" }); | |
} | |
catch (Exception x) | |
{ | |
MessageBox.Show(x.Message, "Error Starting Minesweeper", MessageBoxButtons.OK, MessageBoxIcon.Error); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment