Thanks Matteo for your feedback,
I try your code.
- I uncommented the MapControl
- Added 2 nuget package: Microsoft.Toolkit.Wpf.UI. (Controls and Xamlhost)
-I got error MSB3270, I went to App properties and changed Platform Target from x86 to AnyCpu.
- I got another error where I switched my solution to debug in x64 (with appropriate project)
- I now have:
Severity Code Description Project File Line Suppression State
Error MSB3270 There was a mismatch between the processor architecture of the project being built "AMD64" and the processor architecture of the reference "C:\Prj\Samples\UWP\MCTSummit2020-MiddleEast-master\ModernWpfDemo\ModernWpfDemo\bin\x86\Debug\netcoreapp3.1\win-x86\ModernWpfDemo.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. ModernWpfDemo.Package C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 2106
Or
Severity Code Description Project File Line Suppression State
Error NETSDK1032 The RuntimeIdentifier platform 'win-x86' and the PlatformTarget 'x64' must be compatible. ModernWpfDemo C:\Program Files\dotnet\sdk\3.1.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets 151
Everything is set to x64 in project properties.
I had to hack manually the ModernWpfDemo.csproj to swap
from: <!--<RuntimeIdentifier>win-x86</RuntimeIdentifier>-->
To: <RuntimeIdentifier>win-x64</RuntimeIdentifier>
Now I have when I run the app:
+ $exception {"Could not load file or assembly 'Windows.Foundation.UniversalApiContract, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified."} System.Windows.Markup.XamlParseException