MapWinGis works in Visual Studio 2019 but not in Visual Studio 2022

Is there any explanation for why MapWinGIS works perfectly in Visual Studio 2019 but kicks up Designer errors in 2022? None of the project settings change. Only the VS version.

I get three errors saying

  1. “is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)”
  2. The variable ‘AxMap1’ is either undeclared or was never assigned.
  3. Duplicate component name ‘AxMap1’. Component names must be unique and case-insensitive.

I can just continue developing in VS 2019 for now but that’s not a permanent solution. Any suggestions on what I can do?

1 Like

When it is complaining about the Win32 you probably have not installed the 32Bit version of MapWinGIS.
Try that first.

Another problem with VS2022 is that the Form designer doesn’t work with ActiveX controls anymore when you are on .NET Core.
A workaround is the create a separate project or even solution for .NET Framework. Then the designer still works. Then you need to copy the designer code to your .NET Core designer file.

1 Like

Thanks for your reply. Not really in the mood to jump through hoops. I think it’s going to be simpler to find a different mapping solution.

See answer here The referenced component ‘AxMapWinGIS’ could not be found. There may be a solution forthcoming.

1 Like