Using Windows UI Library 3 Preview 2 (July 2020) that was released just yesterday. On latest version of VS2019 - Preview
, followed this official tutorial Get started with WinUI 3 for desktop apps to create a desktop project. Project successfully compiles but gives the following error when running in debug mode. I'm using Windows10 Pro ver. 1903
:
System.MissingMethodException
HResult=0x80131513
Message=Method not found: 'Void System.Runtime.InteropServices.ComWrappers.RegisterForTrackerSupport(System.Runtime.InteropServices.ComWrappers)'.
Source=WinRT.Runtime
StackTrace:
at WinRT.ComWrappersSupport.set_ComWrappers(ComWrappers value)
at WinRT.ComWrappersSupport.InitializeComWrappers(ComWrappers wrappers)
at WinUI_DesptopPreview2.Program.Main(String[] args) in C:\DotNET5VS2019\Desktop_WinUI\WinUI_DesptopPreview2\WinUI_DesptopPreview2\obj\x64\Debug\net5.0\win-x64\App.g.i.cs:line 25
Screenshot of the error:
I ran into this issue as well, updating .NET 5 SDK to preview 6 solved it for me. Link to the installer: https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-5.0.100-preview.6-windows-x64-installer
User contributions licensed under CC BY-SA 3.0