Original User: NeilThe way you register COM classes with the ESRI component categories has changed for 10.x. The code you posted for your installer class is not correct. Registration is now performed by the esriRegAsm utility. You must change your installer class to call this utility or do as Richard suggested. An updated installer class would look something like this:Public Class Installer1
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
'Add initialization code after the call to InitializeComponent
End Sub
Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)
MyBase.Install(stateSaver)
End Sub
Public Overrides Sub Uninstall(ByVal savedState As System.Collections.IDictionary)
MyBase.Uninstall(savedState)
End Sub
Protected Overrides Sub OnAfterInstall(ByVal savedState As System.Collections.IDictionary)
MyBase.OnAfterInstall(savedState)
Try
' Call the ESRI RegAsm utility to register the assembly classes with the ESRI component categories.
Dim commonFilesPath As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles)
Dim regAsmPath As String = System.IO.Path.Combine(commonFilesPath, "ArcGIS\bin\ESRIRegAsm.exe")
Dim appPath As String = System.Reflection.Assembly.GetExecutingAssembly().Location
Dim args As String = String.Format("""{0}"" /p:Desktop /s", appPath)
Dim startInfo As System.Diagnostics.ProcessStartInfo = New System.Diagnostics.ProcessStartInfo()
startInfo.FileName = regAsmPath
startInfo.Arguments = args
Dim esriRegProcess As New Process
esriRegProcess.StartInfo = startInfo
esriRegProcess.Start()
Do While Not esriRegProcess.HasExited
Loop
Catch ex As Exception
MessageBox.Show(ex.Message, "LRMT Installer", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Protected Overrides Sub OnBeforeUninstall(ByVal savedState As System.Collections.IDictionary)
MyBase.OnBeforeUninstall(savedState)
Try
' Call the ESRI RegAsm utility to register the assembly classes with the ESRI component categories.
Dim commonFilesPath As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles)
Dim regAsmPath As String = System.IO.Path.Combine(commonFilesPath, "ArcGIS\bin\ESRIRegAsm.exe")
Dim appPath As String = System.Reflection.Assembly.GetExecutingAssembly().Location
Dim args As String = String.Format("""{0}"" /p:Desktop /u /s", appPath)
Dim startInfo As System.Diagnostics.ProcessStartInfo = New System.Diagnostics.ProcessStartInfo()
startInfo.FileName = regAsmPath
startInfo.Arguments = args
Dim esriRegProcess As New Process
esriRegProcess.StartInfo = startInfo
esriRegProcess.Start()
Do While Not esriRegProcess.HasExited
Loop
Catch ex As Exception
MessageBox.Show(ex.Message, "LRMT Installer", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
End Class