I can't install microsoft.winappsdk nuget package...

c00012 746 Reputation points
2025-11-14T01:21:46.46+00:00

Hello,

I just installed VS 2026 community edition and tried to install microsoft.winappsdk nuget package on my wpf project.

The problem started from here.

installing process stuck at certain point and I couldn't do anything. so I tried this using CLI, but it didn't work.

If anyone give a good advice to fix the problem, I'd be very appreciated.

Best regards,

c00012

Windows development | Windows App SDK
{count} votes

1 answer

Sort by: Most helpful
  1. Danny Nguyen (WICLOUD CORPORATION) 4,985 Reputation points Microsoft External Staff Moderator
    2025-11-14T07:51:05.75+00:00

    Hi @c00012 ,

    Most “stuck” installs of Microsoft.WindowsAppSDK in a WPF project come from one of these root causes:

    1. Target framework mismatch WinAppSDK does not support classic .NET Framework (e.g. v4.8). You can confirm this via Microsoft.WindowsAppSDK nuget page
    2. Legacy (non–SDK-style) project If your .csproj has <TargetFrameworkVersion>v4.x and uses packages.config, migrate to an SDK-style project first.
    3. 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
    4. 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.
    5. Environmental blockers Corporate proxy / credential provider / antivirus scanning %UserProfile%\.nuget\packages can 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.

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.