Cannot Register Assembly

Add-in Express™ Support Service
That's what is more important than anything else

Cannot Register Assembly
 
siva siva




Posts: 73
Joined: 2009-07-23
Dear Team,

Am using Add-in Express 2009 for .NET in my outlook add on application.

While am trying to build or register adx project am getting the Cannot register assembly error message.

So I can't able to build the application.

Can you advice me.

Thanks in advance.

Siva
Posted 10 Aug, 2010 01:57:44 Top
siva siva




Posts: 73
Joined: 2009-07-23
Dear Team,

I have solved the cannot register assembly issue. And I can't able to install the i have created Outlook Addon in my system. Please find the below adxloader log file content

Add-in Express Loader Log File: 08/10/2010 12:45:10

Startup directory: C:\Documents and Settings\rsivakumar\Application Data\Default Company Name\OutlookAddonSyncSetup\
Loader version: 5.3.2030
------------------
12:45:10 460 2636 Starting the add-in unregistration process.
12:45:10 460 2636 Getting the latest CLR version.
12:45:10 460 2636 The latest CLR version is 'v4.0.30319'.
12:45:10 460 2636 Loading CLR: v4.0.30319.
12:45:10 460 2636 Calling GetCLRMetaHost method.
12:45:10 460 2636 Success.
12:45:10 460 2636 Calling GetRuntime method.
12:45:10 460 2636 Success.
12:45:10 460 2636 Calling GetInterface method.
12:45:10 460 2636 Calling GetInterface method for the CorRuntimeHost interface.
12:45:10 460 2636 Success.
12:45:10 460 2636 Starting CLR...
12:45:10 460 2636 Success.
12:45:10 460 2636 The CLR v4.0.30319 has been initialized successfully.
12:45:10 460 2636 Creating a new domain setup.
12:45:10 460 2636 Success.
12:45:10 460 2636 Getting the add-in directory.
12:45:10 460 2636 Success. The directory is 'C:\Documents and Settings\rsivakumar\Application Data\Default Company Name\OutlookAddonSyncSetup\'
12:45:10 460 2636 The configuration file is 'C:\Documents and Settings\rsivakumar\Application Data\Default Company Name\OutlookAddonSyncSetup\app.config'
12:45:10 460 2636 The 'shadow copy' is disabled.
12:45:10 460 2636 Creating a new application domain.
12:45:10 460 2636 Success.
12:45:10 460 2636 Getting the base directory for the domain.
12:45:10 460 2636 Success. The directory is 'C:\Documents and Settings\rsivakumar\Application Data\Default Company Name\OutlookAddonSyncSetup\'.
12:45:10 460 2636 Searching for the Add-in Express core library.
12:45:10 460 2636 Success. The 'AddinExpress.MSO.2005.dll' file has been found.
12:45:10 460 2636 Creating an instance of the 'AddinExpress.MSO.ADXLoaderSupport' class.
12:45:10 460 2636 Assembly identity is 'AddinExpress.MSO.2005'.
12:45:10 460 2636 Success.
12:45:10 460 2636 Unwrapping the instance of the 'AddinExpress.MSO.ADXLoaderSupport' class.
12:45:10 460 2636 Success.
12:45:10 460 2636 Creating an instance of the XML parser class.
12:45:10 460 2636 Success.
12:45:10 460 2636 Loading the manifest file (C:\Documents and Settings\rsivakumar\Application Data\Default Company Name\OutlookAddonSyncSetup\adxloader.dll.manifest).
12:45:10 460 2636 Success.
12:45:10 460 2636 Getting the root element of the manifest (C:\Documents and Settings\rsivakumar\Application Data\Default Company Name\OutlookAddonSyncSetup\adxloader.dll.manifest).
12:45:10 460 2636 Success.
12:45:10 460 2636 Getting the 'assemblyIdentity' element of the manifest (C:\Documents and Settings\rsivakumar\Application Data\Default Company Name\OutlookAddonSyncSetup\adxloader.dll.manifest).
12:45:10 460 2636 Success.
12:45:10 460 2636 Searching for the 'name' attribute of the 'assemblyIdentity' element.
12:45:10 460 2636 Success. The name is 'OutlookAddonSync, PublicKeyToken=12aa6208c84afd6e'.
12:45:10 460 2636 Calling the managed procedure to unregister the 'OutlookAddonSync, PublicKeyToken=12aa6208c84afd6e' assembly.
12:45:10 852 Connecting to the application domain of the Add-in Express loader.
12:45:10 852 Success.
12:45:10 852 Loading the 'OutlookAddonSync, PublicKeyToken=12aa6208c84afd6e' assembly.
12:45:10 852 Success.
12:45:10 852 Unregistering the 'OutlookAddonSync, PublicKeyToken=12aa6208c84afd6e' assembly (user).
12:45:12 852 Searching for static methods that contain the 'ComRegisterFunction' attribute.
12:45:12 852 Calling the 'AddinUnregister' static method.
12:45:14 852 Error: Exception has been thrown by the target of an invocation.
12:45:14 852 Inner Exception: Exception has been thrown by the target of an invocation.
12:45:14 852 The managed unregistration process is complete with HRESULT = 2.
12:45:14 460 2636 The system cannot find the file specified.

Can you advice me?

Thanks in advance.

Siva
Posted 10 Aug, 2010 02:29:49 Top
siva siva




Posts: 73
Joined: 2009-07-23
Dear Team,

While installing setup file am getting the below message

The installer was interrupted before outlookAddonSyncSetup could be installed. You need to restart the installer to try again.

Let me know how can i solve this?

Siva
Posted 10 Aug, 2010 02:35:18 Top
Eugene Astafiev


Guest


Hi Siva,

I have noticed the following line in the adxloader.log file:

12:45:10 852 Unregistering the 'OutlookAddonSync, PublicKeyToken=12aa6208c84afd6e' assembly (user).


Do you try to unregister the add-in? Please make sure that you previously removed/unregister the add-in from Visual Studio.
Posted 10 Aug, 2010 06:05:35 Top
Kevin Gorski




Posts: 8
Joined: 2010-09-08
I'm seeing the same behavior with the installer for a project that was working before installing recent Windows updates, and I have made sure to unregister the add-in through Visual Studio. Do you have any other suggestions?

Add-in Express Loader Log File: 09/08/2010 10:41:23

Startup directory: C:\Users\kgorski\AppData\Roaming\ProjectName\
Loader version: 5.3.2030
------------------
10:41:23 884 1512 Starting the add-in unregistration process.
10:41:23 884 1512 Getting the latest CLR version.
10:41:23 884 1512 The latest CLR version is 'v4.0.30319'.
...
10:41:23 884 1512 Searching for the 'name' attribute of the 'assemblyIdentity' element.
10:41:23 884 1512 Success. The name is 'ProjectName, PublicKeyToken=79e34fe4a866df94'.
10:41:23 884 1512 Calling the managed procedure to unregister the 'ProjectName, PublicKeyToken=79e34fe4a866df94' assembly.
10:41:23 948 Connecting to the application domain of the Add-in Express loader.
10:41:23 948 Success.
10:41:23 948 Loading the 'ProjectName, PublicKeyToken=79e34fe4a866df94' assembly.
10:41:23 948 Success.
10:41:23 948 Unregistering the 'ProjectName, PublicKeyToken=79e34fe4a866df94' assembly (user).
10:41:23 948 Searching for static methods that contain the 'ComRegisterFunction' attribute.
10:41:23 948 Calling the 'AddinUnregister' static method.
10:41:23 948 Error: Exception has been thrown by the target of an invocation.
10:41:23 948 Inner Exception: Exception has been thrown by the target of an invocation.
10:41:23 948 The managed unregistration process is complete with HRESULT = 2.
10:41:23 884 1512 The system cannot find the file specified.
Posted 08 Sep, 2010 12:13:49 Top
Eugene Astafiev


Guest


Hi Kevin,

I have a bunch of questions for you:

1. Did you add any extra code to the add-in module constructor? May be you use any third party controls?
2. What OS do you use?
3. VS version?
4. Did you set the RegisterForAllUsers property of the add-in module to true?
Posted 08 Sep, 2010 13:00:12 Top
Kevin Gorski




Posts: 8
Joined: 2010-09-08
1. Did you add any extra code to the add-in module constructor? May be you use any third party controls?

Here's the AddinModule constructor:

	Public Sub New()
		MyBase.New()

		'This call is required by the Component Designer
		InitializeComponent()

		'Please add any initialization code to the AddinInitialize event handler
		System.Windows.Forms.Application.EnableVisualStyles()

	End Sub


We're not using any 3rd party controls.

2. What OS do you use?

Windows 7 is what I've been testing on, though we'll be supporting XP and Vista as well.

3. VS version?

2008.

4. Did you set the RegisterForAllUsers property of the add-in module to true?

I tried it both set to false (as it was when it was working last) and true, and both had the same outcome.
Posted 08 Sep, 2010 18:58:41 Top
Eugene Astafiev


Guest


Hi Kevin,

Is the UAC enabled in Windows 7? Did you run the setup.exe? Are you able to reproduce the issue with a newly created add-in project?
Posted 09 Sep, 2010 04:32:51 Top
Kevin Gorski




Posts: 8
Joined: 2010-09-08
UAC is enabled, and I did run Setup.exe as an administrator.

If I create a new add-in project with installer and make no additional changes, the installer completes without error and shows up in the add-in list for Outlook.
Posted 09 Sep, 2010 11:27:28 Top
Eugene Astafiev


Guest


Hi Kevin,

It looks like you did something wrong with your add-in project (or installer).

Could you please send your project to me (see readme.txt for the e-mail address)? I will test it on my PC tomorrow.
Posted 09 Sep, 2010 11:45:48 Top