MapPoint 2010 and .Net

I have noticed that even the simplest of tasks – if performed infrequently – become challenging.  One example, upgrading the MapPoint control.  Since new releases only happen every year or every other year, it becomes increasingly difficult to assert with a reasonable degree of confidence that nothing was missed in the upgrade process!  Of course, upgrades are *much* easier than the initial implementation.

So, for all those who have so badly wanted to do add MapPoint functionality in their .Net applications but didn’t have a cheatsheet, here is a peek at our process for integrating MapPoint in your Visual Studio applications.  Enjoy!

  1. Copy the MapPointControl.ocx and MPNA83.tlb (from the MapPoint installation folder to your working folder)
  2. From your working folder, run AxImp
    • For instance: Aximp /keycontainer:YourKeyContainer /source MapPointControl.ocx /out:AxMappoint.dll
    • Where YourKeyContainer is the name of your certificate container for code signing.  Quick note: code signing is optional but I would strongly recommend it
  3. This will generate 3 files:
    • MapPoint.dll
    • AxMappoint.dll
    • AxMappoint.cs
  4. Next, you will need to run the type library importer as follows:
    • tlbimp MPNA83.tlb /namespace:MapPointApp /out:MapPointApp.dll /asmversion:M.m.B.R /keycontainer:YourKeyContainer
    • Where M.m.B.R is simply the Major, minor, build, and revision numbers that you wish to assign to the generated MapPointApp.dll
    • Once again, code-signing is optional but recommended
  5. Almost there! Here is the final step (needed only when code-signing)
    • “C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\signtool” sign /i Issuer /n CertificateSubjectName /t TimeStampServerURL /v MapPoint.dll
    • “C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\signtool” sign /i Issuer /n CertificateSubjectName /t TimeStampServerURL /v AxMapPoint.dll
    • “C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\signtool” sign /i Issuer /n CertificateSubjectName /t TimeStampServerURL /v MapPointApp.dll
    • “C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\signtool” sign /i Issuer /n CertificateSubjectName /t TimeStampServerURL /v MappointControl.ocx
    • Where Issuer is the name of the certificate issuing authority, CertificateSubjectName is well the subject name on the certificate and the TimeStampServerURL is also jsut that
    • The /v option is to enable verbose mode

One comment on “MapPoint 2010 and .Net

  1. Salima Mulji says:

    I TOTALLY agree!! Starting a task is very challanging and so is keeping up with infrequently used skills…..Nicely said!!! Of course the rest is all jargon for me…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s