適用対象: Visual Studio 2022
現象
Visual Studio 用の Windows アプリ SDK C# 拡張機能をオフラインでインストールすると、次のエラー メッセージが表示されて失敗します。
Install Failed
The install of 'Windows App SDK C# VS2022 Templates' was not successful for all the selected products.
For more information, click on the install log link at the bottom of the dialog.
Windows App SDK C# VS2022 Templates
One or more errors occurred.
解決方法
Visual Studio のWindows アプリ SDK拡張機能のオフライン インストールを実行するには、次のコマンド ラインを実行します。
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe" /noextensionpack <path to the WindowsAppSDK VSIX>
<path to the WindowsAppSDK VSIX>
を、Windows アプリ SDK VSIX 拡張ファイルの実際のファイル パスに置き換えます。 詳細については、「 WinApp SDK Dev 17 Offline Install Failure」を参照してください。
さらに、最初の WinUI 3 (Windows アプリ SDK) プロジェクトを作成しWindows アプリ SDKを使用してサンプル WinUI 3 プロジェクトをテストできます。