Marshalling Error for WinUI 3 Application
Hello. So I've been creating a WinUI 3 app C# in visual studio. For loading the list of installed fonts, I had to install Microsoft.Graphics.Win2D NuGet package. For that, it required me to update the NuGet packages of "WindowsAppSDK" and "Windows.SDK.BuildTools" to the latest versions. I've attached the list of packages I've installed/updated below. The Win2D package gets installed successfully but there is an error saying "This version of the Windows App SDK requires Microsoft.Windows.SDK.NET.Ref 10.0.19041.38 or later". So, when I searched this error in Google, some people said to use this in the project file,
<WindowsSdkPackageVersion>10.0.19041.41</WindowsSdkPackageVersion>
I've used that but following up another error pops up saying "Cannot find type System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider in module System.Runtime.InteropServices.dll.". I've searched up this error but no results. I have no clue about this. Please help me out. Thank you.