diff --git a/GetStoreApp/GetStoreApp.csproj b/GetStoreApp/GetStoreApp.csproj
index e172116f..a0b78c11 100644
--- a/GetStoreApp/GetStoreApp.csproj
+++ b/GetStoreApp/GetStoreApp.csproj
@@ -22,7 +22,7 @@
x86;x64;ARM64
FileSystem
False
- true
+ true
True
true
PackageReference
@@ -117,7 +117,8 @@
-
+
+
diff --git a/GetStoreApp/UI/Dialogs/Settings/RestartAppsDialog.xaml.cs b/GetStoreApp/UI/Dialogs/Settings/RestartAppsDialog.xaml.cs
index 3ae67a80..e4927bef 100644
--- a/GetStoreApp/UI/Dialogs/Settings/RestartAppsDialog.xaml.cs
+++ b/GetStoreApp/UI/Dialogs/Settings/RestartAppsDialog.xaml.cs
@@ -1,5 +1,5 @@
-using Microsoft.UI.Xaml;
-using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.Windows.AppLifecycle;
// 抑制 CA1822,IDE0060 警告
#pragma warning disable CA1822,IDE0060
@@ -21,7 +21,7 @@ public RestartAppsDialog()
///
private void OnRestartAppsClicked(ContentDialog sender, ContentDialogButtonClickEventArgs args)
{
- (Application.Current as WinUIApp).Restart();
+ AppInstance.Restart("Restart");
}
}
}
diff --git a/GetStoreApp/WinUIApp.xaml.cs b/GetStoreApp/WinUIApp.xaml.cs
index 3265a216..afd90fee 100644
--- a/GetStoreApp/WinUIApp.xaml.cs
+++ b/GetStoreApp/WinUIApp.xaml.cs
@@ -6,7 +6,6 @@
using Microsoft.UI;
using Microsoft.UI.Xaml;
using System;
-using System.IO;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Windows.Foundation.Diagnostics;
@@ -120,17 +119,6 @@ private void SetAppIcon()
}
}
- ///
- /// 重启应用
- ///
- public void Restart()
- {
- MainWindow.Current.AppWindow.Hide();
- ProcessHelper.StartProcess(Path.Combine(InfoHelper.AppInstalledLocation, "GetStoreApp.exe"), "Restart", out _);
-
- Dispose();
- }
-
///
/// 释放资源
///
diff --git a/GetStoreAppWebView/GetStoreAppWebView.csproj b/GetStoreAppWebView/GetStoreAppWebView.csproj
index 85be673c..f72d5904 100644
--- a/GetStoreAppWebView/GetStoreAppWebView.csproj
+++ b/GetStoreAppWebView/GetStoreAppWebView.csproj
@@ -61,7 +61,8 @@
-
+
+
diff --git a/Microsoft.Management.Deployment.Projection/Microsoft.Management.Deployment.Projection.csproj b/Microsoft.Management.Deployment.Projection/Microsoft.Management.Deployment.Projection.csproj
index 3e550dfe..7c944496 100644
--- a/Microsoft.Management.Deployment.Projection/Microsoft.Management.Deployment.Projection.csproj
+++ b/Microsoft.Management.Deployment.Projection/Microsoft.Management.Deployment.Projection.csproj
@@ -1,13 +1,13 @@
- Microsoft.Management.Deployment
+ Microsoft.Management.Deployment
10.0.22621.0
true
false
true
x64;x86;ARM64
- true
- full
+ true
+ full
net9.0-windows10.0.22621.0
10.0.19041.0
10.0.22621.35-preview