Hypercubed Blog

Incoherent chatter on issues related to science, computing, and philosophy.
Random chains of thought from a scattered mind.

Hypercubed Blog has Moved!

 

Visual Studio cannot debug [MapPoint] Add-In if .NET 2.0 runtime installed
Posted Saturday, April 30, 2005 4/30/2005 12:16:00 AM

I've done a lot of programming in MS Visual Basic using version 6.0 but recently I have been switching over to VB.NET 2003. One application (Coordinate Exchange) that I wrote in 6.0 was an plug-in for MapPoint. This application has been been fairly popular among MapPoint users and for a while now I've wanted to convert it to a more stable VB.net version. I knew converting wouldn't be easy but I couldn't even get past the first gate. For nearly a year now I had been trying to create an add-in for MapPoint using VB.NET and constantly running into a brick wall. I could setup the application just fine (see instructions here) but for some reason I could never get the runtime debugging to work. The application would run fine if installed but always crashed silently when entering debug mode. I had literally been trying to figure this out for the past year (from as early as May 10, 2004)... I searched the web, posted multiple requests for help to forums and news groups, and even sent an e-mail to a MapPoint developer (Chandu Thota) and never got any response. I was really shocked that nobody appeared to be having the same problem. Was it just me? I tried on several of my machines and each had the same problem. I was stuck.

I'm glad to say that I've finally solved it. Or actually somebody else solved it for a similar situation and I finally came across the answer. See the problem was not me or my application but the fact that every machine I owned had Microsoft .NET Framework version 2.0 installed. When MapPoint would open the addin it would load the version 2.0 by default. Visual Basic.NET 2003 would be attempting to debug assuming version 1.1. The application would then crash without any error message.

The solution is actually very simple. You have to instruct MapPoint to use the NET Framework 1.1. To do this create a file in the MapPoint directory (the one containing MapPoint.exe) named MapPoint.exe.config. The file should contain the following text:

<configuration>
<startup>
<supportedRuntime version="v1.1.4322"/>
</startup>
</configuration>


After that all MP plug-ins run using 1.1 runtime and there are no more crashes in debug mode. Now all I have to do is spend the next year or so and convert all my 6.0 code to .NET. Wish me luck.

4 Comments:

  • I should mention that if you are using VS 2005 beta you should not do this. Version 2005 uses the 2.0 framework. If you use both I suggest you rename the file mappoint.exe.bak before using VS 2005 and then back to mappoint.exe.config when using VS 2003.

    By Blogger harshblogger, at 4/30/2005 11:24:00 AM  

  • why in the world would you use VS 2005 beta any way?

    By Anonymous Anonymous, at 4/30/2005 11:38:00 AM  

  • Because it is free: http://lab.msdn.microsoft.com/express/

    By Blogger harshblogger, at 4/30/2005 12:42:00 PM  

  • Hey, you have a great blog here! I'm definitely going to bookmark you!
    I have a **WEB HOSTING** site/. It pretty much covers WEB HOSTING related stuff.
    Come and check it out if you get time :-)

    By Anonymous Anonymous, at 10/10/2005 01:49:00 AM  

Post a Comment


:


Links to this post:

Create a Link

<< Home

Previous Posts

Google
 
Web hypercubed.blogspot.com
www.hypercubed.com