WinUI in VS 2019 Preview gives error "... requires WinRT.Runtime.dll version 1.2 or greater" and more
See original GitHub issueDescribe the bug Unable to build “Blank App, Packaged (WinUI 3 in Desktop)”. The error list contains:
This version of Project Reunion requires WinRT.Runtime.dll version 1.2 or greater. Please update to .NET 5.0.6 SDK or later. Or add a temporary Microsoft.Windows.SDK.NET.Ref FrameworkReference of version > 10.0.*.16 or later.
I also note that I have yellow triangles in the Dependencies regarding the WinUI, see below.
Steps to reproduce the bug
- I installed the VS 2019 Preview from microsofts webpage, version is Version 16.10.0 Preview 2.1
- I followed the instructions here: https://docs.microsoft.com/en-us/windows/apps/project-reunion/get-started-with-project-reunion#set-up-your-development-environment and here https://docs.microsoft.com/en-us/windows/apps/winui/winui3/get-started-winui3-for-desktop to setup Reunion
- Open VS2019 Preview, create new Project "“Blank App, Packaged (WinUI 3 in Desktop)”
- Build
Expected behavior I expected the app to build and run, with no apparent errors.
What happened instead In step 5 here: https://docs.microsoft.com/en-us/windows/apps/winui/winui3/get-started-winui3-for-desktop, after clicking OK, I get this error message:
After clicking OK in that error popup, the project loads, and I can see errors in the dependencies:
I also note that the “Windows Application Packaging Project” that is supposed to be created (according to the URL above), is not created.
Version Info WinUI packages version: 0.5.5 Windows app type: desktop OS: Win 10 20H2 build 19042.928
NuGet package version: See above.
Windows app type: Ehm, I am not sure. It says “Output type: Window Application”, so I guess Win32?
UWP | Win32 |
---|---|
? | Yes |
Windows 10 version | Saw the problem? |
---|---|
October 2020 Update (19042) | Yes |
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
Additional context
I have used the maui-check
tool, and that says that everything is OK:
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (7 by maintainers)
Top GitHub Comments
@AghaKhan Did you try the option of adding this block in your .csproj file?
Yes, that worked. I was very confused from this thread here, where I thought they said that it is not the package project that should be started:
That sounded to me that Packaging shouldn’t be run. Apparently, I misread of they said the wrong thing.
Thanks for your input asklar =)