Select to view content in your preferred language

How do I register a .tlb in ArcMap with Visual Studio 2010 Installer?

2565
5
Jump to solution
10-02-2013 01:17 PM
RonaldFlint
Emerging Contributor
I had to update a product written by ESRI for my company. The project itself had to be upgraded for Visual Studio 2010 from VS2008, and after this the installer project did not work. So, I created a new one that works. In order to get the commands to show up under Customize Mode in ArcMap, however, I have to manually register the .tlb file.

Is there a way to set this up in the installer so that it is automatically registered in ArcMap upon install?
0 Kudos
1 Solution

Accepted Solutions
NeilClemmons
Honored Contributor
You shouldn't include the *.tlb files with your deployment.  All of your ESRI components should have component category registration code added to them.  Add an installer class to your project that has the code necessary to perform the registration.  The code inside your installer class will depend on which version of ArcGIS Desktop you're using.  Use a Custom Action in the installer to call the installer class.

All of this is explained in the help:

http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/#/How_to_deploy_a_custom_component...


The help documents for previous versions have similar topics.

View solution in original post

0 Kudos
5 Replies
NeilClemmons
Honored Contributor
You shouldn't include the *.tlb files with your deployment.  All of your ESRI components should have component category registration code added to them.  Add an installer class to your project that has the code necessary to perform the registration.  The code inside your installer class will depend on which version of ArcGIS Desktop you're using.  Use a Custom Action in the installer to call the installer class.

All of this is explained in the help:

http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/#/How_to_deploy_a_custom_component...


The help documents for previous versions have similar topics.
0 Kudos
RonaldFlint
Emerging Contributor
Thank you Neil. This is very helpful.
0 Kudos
RonaldFlint
Emerging Contributor
I followed the directions to create the installer but the installer gives me a "file not found" error. Are you sure the .tlb should not be included? Should the .tlb appear under 'Detected Dependencies' but not part of the files under File System on Target Machine->Application Folder?
0 Kudos
NeilClemmons
Honored Contributor
I'm positive.  The tlb will most likely show up under Detected Dependencies, in which case you should right-click and Exclude it.  Same with the ESRI assemblies and anything else that is guaranteed to be on the target machine.  The installer package should include the Primary Output for your application as well as any dependencies, such as code libraries, 3rd party assemblies, etc. that are not typically installed on the target machine.

Also note, the instructions I referenced are for ArcGIS Desktop 10.  If you're not using 10, then you may be getting the error because it can't find esriRegAsm.exe when the installer class code runs.
0 Kudos
RonaldFlint
Emerging Contributor
It was a problem with the command strings in my installer class code. I fixed that and it works just fine, without the .tlb just as you said.

Thanks again, Neil!
0 Kudos