CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.
https://aka.ms/windowsappsdk
Other
384 stars 89 forks source link

Using MapControl inside a win32 app with WPF GUI (NET Core) #306

Open ivan2007 opened 3 years ago

ivan2007 commented 3 years ago

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:

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

image

image

image

Is this a supported scenario? If it is, what am I missing?

Thanks!

ghost commented 3 years ago

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 🙌

ivan2007 commented 3 years ago

The test project can be found here

ivan2007 commented 3 years ago

Even without MapControl there are these exceptions: 'System.PlatformNotSupportedException' in System.Configuration.ConfigurationManager.dll 'System.Configuration.ConfigurationErrorsException' in System.Configuration.ConfigurationManager.dll

ghost commented 3 years ago

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.

ghost commented 3 years ago

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.

andrewleader commented 3 years ago

Hey @michael-hawker can you help make sure this MapControl Win32 issue gets seen by the right person? Thanks 😊

michael-hawker commented 3 years ago

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.

ivan2007 commented 3 years ago

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

image

image