1

I have a WPF project built on .Net Framework 4.8 and packaged using Windows Application Packaging Project. When I tried to upgrade it to .Net Framework 4.8.1 for ARM64 support, I am getting NU1201 error during Nuget restoration.

NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362). Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)

I have tried to trim everything down to a minimum reproducible repo here:

There are 2 tags:

  • netframework48 and
  • netframework481

Their difference is switching over to ".Net Framework 4.8.1" in the project properties view:

enter image description here

On netframework48, run nuget restore .\WpfApp7.sln successfully restores the packages, while on netframework481, the same command fails with the following error message.

> nuget restore .\WpfApp7.sln
MSBuild auto-detection: using msbuild version '17.3.1.41501' from 'd:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\bin'.
Assets file has not changed. Skipping assets file writing. Path: D:\Work\temp\WpfApp7\WpfApp7\obj\project.assets.json
Restored D:\Work\temp\WpfApp7\WpfApp7\WpfApp7.csproj (in 69 ms).
Restoring packages for D:\Work\temp\WpfApp7\WpfApp7.Package\WpfApp7.Package.wapproj...
NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362). Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm-aot. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm64-aot. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64-aot. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86-aot. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
Assets file has not changed. Skipping assets file writing. Path: D:\Work\temp\WpfApp7\WpfApp7.Package\obj\project.assets.json
Failed to restore D:\Work\temp\WpfApp7\WpfApp7.Package\WpfApp7.Package.wapproj (in 500 ms).

Errors in D:\Work\temp\WpfApp7\WpfApp7.Package\WpfApp7.Package.wapproj
    NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362). Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
    NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
    NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm-aot. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
    NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm64-aot. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
    NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
    NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64-aot. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
    NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)
    NU1201: Project WpfApp7 is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86-aot. Project WpfApp7 supports: net481 (.NETFramework,Version=v4.8.1)

NuGet Config files used:
    C:\Users\arieszhang\AppData\Roaming\NuGet\NuGet.Config
    C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.FallbackLocation.config
    C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config

Feeds used:
    C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
    https://api.nuget.org/v3/index.json
1 of 2 projects are up-to-date for restore.

Searched around but still did not figure out what this error exactly means? and how to fix this issue? In my project there is neither a project dependency nor a dependency from NetStandard to NetCoreApp as the definition of the error says.

I have tried every UWP target in the WpfApp7.Package properties, but the error remains regardless which min version selected, so I'm assuming the UWP target version is unlikely the cause.

enter image description here

Same question is also cross posted here: https://github.com/NuGet/Home/discussions/12206


Updates on 12 Nov 2022: There is a great answer in the above github issue. Please see it there: https://github.com/NuGet/Home/discussions/12206#discussioncomment-4082656.

1 Answer 1

0

Please see here for all supported Windows versions of .NET Framework 4.8.1 (found in this blog post):

Windows Client versions: Windows 11, Windows 10 version 21H2, Windows 10 version 21H1, Windows 10 version 20H2

So from that piece of information, I'd say Windows 10 10.0.18362 aka Windows 10 version 1903 is way too old for .NET Framework 4.8.1.

Sign up to request clarification or add additional context in comments.

1 Comment

I suspected so too, so I tried to change the min target UWP version to the latest Windows 11 22H2 (10.0.22621) but still getting the same error (except the error message became "Project WpfApp7 is not compatible with uap10.0.22621").

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.