Hi @c00012 ,
Most “stuck” installs of Microsoft.WindowsAppSDK in a WPF project come from one of these root causes:
- Target framework mismatch WinAppSDK does not support classic .NET Framework (e.g. v4.8). You can confirm this via Microsoft.WindowsAppSDK nuget page
- Legacy (non–SDK-style) project If your .csproj has
<TargetFrameworkVersion>v4.xand usespackages.config, migrate to an SDK-style project first. - NuGet source / cache issues
- Make sure nuget.org is enabled.
- Clear caches:
dotnet nuget locals all --clear - Retry via CLI for clearer output:
dotnet add package Microsoft.WindowsAppSDK --verbosity detailed
- Missing VS workloads / components In Visual Studio Installer ensure:
- .NET desktop development
- Windows SDK (10.0.19041 or newer)
- (Optional) MSIX packaging tools if you’ll package the app.
- Environmental blockers Corporate proxy / credential provider / antivirus scanning
%UserProfile%\.nuget\packagescan stall restores.
If instead you're having trouble referencing the package, try including WindowsAppSdkIncludeVersionInfo in csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>your-framework</TargetFramework>
<UseWPF>true</UseWPF>
<WindowsAppSdkIncludeVersionInfo>true</WindowsAppSdkIncludeVersionInfo>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.251106002" />
</ItemGroup>
</Project>
If a brand‑new test project like that installs the package, the issue is with the original project (migration / config). If it still hangs, we need diagnostics.
Please share snippets of the following:
- Your .csproj contents
- Output of
dotnet --info - Windows version (
winver) - Last ~30 lines from:
dotnet add package Microsoft.WindowsAppSDK --verbosity diagnostic
With that info we can pinpoint the failure instead of guessing. Happy to help further once you post those details.