Skip to content

Commit

Permalink
Fixed an issue with Process.Start() in NETCOREAPP (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
fafa3711 committed May 9, 2024
1 parent c5b8cfb commit b3ea407
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion AutoUpdater.NET/UpdateForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,13 @@ private void ButtonUpdateClick(object sender, EventArgs e)
{
if (AutoUpdater.OpenDownloadPage)
{

var processStartInfo = new ProcessStartInfo(_args.DownloadURL);

#if NETCOREAPP
// for .NET Core, UseShellExecute must be set to true, otherwise
// opening URLs via Process.Start() fails
processStartInfo.UseShellExecute = true;
#endif
Process.Start(processStartInfo);

DialogResult = DialogResult.OK;
Expand Down

0 comments on commit b3ea407

Please sign in to comment.