Share via

Error NETSDK1112: The runtime pack for Microsoft.NETCore.App.Runtime.win-x64 was not downloaded when building MAUI Windows app

Manjunath Vadigeri 40 Reputation points
2025-11-07T11:00:25.1333333+00:00

Hi everyone,

I have a .NET MAUI project configured as follows in my .csproj:

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<WindowsSdkPackageVersion>10.0.19041.54</WindowsSdkPackageVersion>
<TargetFrameworks>net9.0-ios;net9.0-android35.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>

On my build PC, I installed the latest version of Visual Studio 2022 with the following workloads:

.NET Multi-platform App UI development

.NET desktop development

When I try to build a Windows MSIX package using this command:

msbuild /t:Publish /p:TargetFramework=net9.0-windows10.0.19041.0 /p:Platform=x64 /p:RuntimeIdentifier=win10-x64 /p:AppxPackageDir="AppPackages/Windows/" /p:GenerateAppxPackageOnBuild=true /p:AppxBundlePlatforms="x64" /p:SelfContained=true /p:WindowsAppSDKSelfContained=true /p:PublishReadyToRun=false /p:AppxPackageSigningEnabled=false

I get the following error:

##[error]C:\Program Files\dotnet\sdk\9.0.111\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(495,5): 
Error NETSDK1112: The runtime pack for Microsoft.NETCore.App.Runtime.win-x64 was not downloaded. 
Try running a NuGet restore with the RuntimeIdentifier 'win-x64'.

Questions

  1. Why is this error thrown?
  2. Shouldn’t the runtime pack (Microsoft.NETCore.App.Runtime.win-x64) already be available after installing the above Visual Studio workloads?
  3. Is there an additional SDK or workload that must be installed for MAUI Windows builds targeting net9.0-windows10.0.19041.0?
Developer technologies | .NET | .NET Multi-platform App UI
0 comments No comments

Answer accepted by question author

Jack Dang (WICLOUD CORPORATION) 18,810 Reputation points Microsoft External Staff Moderator
2025-11-10T07:34:01.9433333+00:00

Hi @Manjunath Vadigeri ,

I’ve looked into your issue and was able to recreate the exact NETSDK1112 error when building a .NET MAUI Windows app targeting net9.0-windows10.0.19041.0. Here’s what’s happening:


Why is this error thrown?

It happens because your project is doing a self-contained publish. MSBuild tries to include the full .NET runtime for win-x64, but for .NET 9 the required runtime pack (Microsoft.NETCore.App.Runtime.Mono.win-x64) hasn’t been published yet, so it can’t download it — hence NETSDK1112.

Shouldn’t Visual Studio workloads provide this runtime pack?

Not in this case. The workloads you installed (.NET Multi-platform App UI and .NET desktop development) only install the SDKs and framework-dependent runtime components, not all self-contained runtime packs. Since the .NET 9 win-x64 runtime pack isn’t available yet, the workloads alone don’t help.

Is there an extra SDK or workload needed?

No, there isn’t one right now. This is purely due to a missing runtime pack for .NET 9 self-contained Windows builds. Once Microsoft releases it, self-contained publishing will work as expected.


I hope this clarifies! Let me know if you have any question!

Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. AI answer

    2025-11-07T11:00:36.2066667+00:00

    The error NETSDK1112 indicates that the runtime pack for Microsoft.NETCore.App.Runtime.win-x64 was not downloaded, which is necessary for building your .NET MAUI Windows app. This error typically arises when the required runtime pack is not available in your local environment, even after installing the necessary Visual Studio workloads.

    1. Why is this error thrown?
      The error is thrown because the build process cannot find the required runtime pack for the specified RuntimeIdentifier (win-x64). This often means that the runtime pack has not been restored or installed correctly.
    2. Shouldn’t the runtime pack (Microsoft.NETCore.App.Runtime.win-x64) already be available after installing the above Visual Studio workloads?
      While installing the Visual Studio workloads should include many necessary components, it does not always guarantee that all runtime packs are downloaded. Sometimes, you need to explicitly restore the NuGet packages, which can include the runtime packs.
    3. Is there an additional SDK or workload that must be installed for MAUI Windows builds targeting net9.0-windows10.0.19041.0?
      To ensure that all necessary components are available, you may need to run a NuGet restore command with the specified RuntimeIdentifier. This can be done using the command:
         dotnet restore --runtime win-x64  
      
      Additionally, ensure that you have the latest Windows SDK and .NET SDK installed that correspond to your target framework version.

    Following these steps should help resolve the error and allow you to build your MAUI Windows app successfully.

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was 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.