Problem with updating to 5.2.4

Tried to follow the procedure for updating to 5.2.4, but having problems with a project that worked previously. I’m getting a message that the reference to the map control already exists, and that I must remove the old reference before adding this one.

Anyone have any ideas as to how to remove the old reference? Kind of new to VS 2017, so I suspect this has an easy solution that I’m unaware of…

Thanks in advance,

Scott

Got through that step but now have a class not registered error at this line in the designer…

((System.ComponentModel.ISupportInitialize)(this.axMap2)).EndInit();

Hello @drummonds

Since all of the COM GUID’s stay the same, you should only have to Rebuild your project to update references to the new OCX.

What procedure are you referring to that you followed to update the OCX?

Jerry.

Hello @drummonds

I was working on another issue, created a c# project, and ran into the exception on EndInit.

The issue was that the Platform Target cannot be set to Any CPU. The exe is attempting to run as a 64-bit app. It must be set x86 to use the 32-bit OCX.

I presume that is what you’re running into.

Regards,
Jerry.

Hello again. Another follow-up regarding the update to 5.2.4:

I was having similar issues where the VS2017 project was not recognizing new features of the OCX, and was still reporting 5.1. It can be messy removing the AxMapWinGIS reference and trying to add it back in through the designer, so instead I opened the project in a text editor (Notepad++, in my case), found the references to AxMapWinGIS and MapWinGIS. The GUID’s stay the same, but you can change the version to 5.2, then reload the project.

Jerry.

Jerry,

That was it – when I discovered that, I withdrew my question.

Much appreciated!

Scott

That’s good to know – and a much easier approach than what I went through!

Regards,

Scott