Microsoft.Toolkit.Win32
Microsoft.Toolkit.Win32 copied to clipboard
Using MapControl inside a win32 app with WPF GUI (NET Core)
Hi! I have a win32 app with a WPF GUI. I built the solution following this blog https://devblogs.microsoft.com/cppblog/porting-a-c-cli-project-to-net-core/ The projects in the solution are:
- win32 native app
- c++/cli NET Core library
- WPF NET Core user control library
I added the map control to the WPF NET Core lib. Everything seems to work but there are various exceptions in the output window and also data binding errors



Is this a supported scenario? If it is, what am I missing?
Thanks!
Hello ivan2007, thank you for your interest in Win32!
I have automatically added a "needs triage" label to help get things started. Our team will look into the question and answer ASAP. Other community members may also answer the question and provide feedback 🙌
The test project can be found here
Even without MapControl there are these exceptions: 'System.PlatformNotSupportedException' in System.Configuration.ConfigurationManager.dll 'System.Configuration.ConfigurationErrorsException' in System.Configuration.ConfigurationManager.dll
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.
Hey @michael-hawker can you help make sure this MapControl Win32 issue gets seen by the right person? Thanks 😊
Thanks @andrewleader we've been heads down on the 7.0 release and the WinUI team which owns XAML Islands has been focused on WinUI 3.
@marb2000 does this seem familiar at all?
@ivan2007 have you tried starting from the XAML Islands samples? https://github.com/marb2000/XamlIslands
I'm not sure if the MapControl needs to be in a packed app or not to function, this isn't my area of expertise. FYI @azchohfi too in case this seems familiar.
Hi @michael-hawker, I tried the MapControl in a simple WPF app with Net Core 3.1. Many of the exceptions are the same. Everything seems to work fine but there are execptions like BadImageFormat and AmbiguousMatch which leave me doubtful. The test project is here

