From f54bf249dc08a3eaeafb02c0b2396d4e056f472e Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 3 Jan 2021 20:15:28 +0800 Subject: [PATCH] fix<*>: fix .NET 4.6 Process.Start not open default browser issue --- src/UI/About.xaml.cs | 3 ++- src/UI/UpdateAvailable.xaml.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UI/About.xaml.cs b/src/UI/About.xaml.cs index 204ac006..613133c5 100644 --- a/src/UI/About.xaml.cs +++ b/src/UI/About.xaml.cs @@ -26,7 +26,8 @@ namespace SourceGit.UI { /// /// private void OpenSource(object sender, RequestNavigateEventArgs e) { - Process.Start(new ProcessStartInfo("cmd", $"/c start {e.Uri.AbsoluteUri}") { CreateNoWindow = true }); + Process.Start(e.Uri.AbsoluteUri); + //Process.Start(new ProcessStartInfo("cmd", $"/c start {e.Uri.AbsoluteUri}") { CreateNoWindow = true }); e.Handled = true; } diff --git a/src/UI/UpdateAvailable.xaml.cs b/src/UI/UpdateAvailable.xaml.cs index b4ac007c..b0264a3f 100644 --- a/src/UI/UpdateAvailable.xaml.cs +++ b/src/UI/UpdateAvailable.xaml.cs @@ -32,7 +32,8 @@ namespace SourceGit.UI { /// /// private void Download(object sender, RoutedEventArgs e) { - Process.Start(new ProcessStartInfo("cmd", $"/c start https://gitee.com/sourcegit/SourceGit/releases/{tag}") { CreateNoWindow = true }); + Process.Start($"https://gitee.com/sourcegit/SourceGit/releases/{tag}"); + //Process.Start(new ProcessStartInfo("cmd", $"/c start https://gitee.com/sourcegit/SourceGit/releases/{tag}") { CreateNoWindow = true }); e.Handled = true; }