Add-In stopped working after installing .net 4.0

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

Add-In stopped working after installing .net 4.0
 
Alexander Schweighofer




Posts: 28
Joined: 2009-06-02
Hello!

We have an outlook add-in that worked properly until some of our customers started to roll out .net 4.0 on their client computers. After that point our add-in stopped working, it is still listed as active in the trust center and all seems to be ok, but it is not shown anymore.

I have downloaded and installed the newest version of add-in express 2009 and updated all assemblys but it still does not work!

the adxloader.log shows the following output:

Loader version: 5.0.2022
------------------
14:07:53 4156 4292 Start.
14:07:53 4156 4292 Reading the registry key 'HKEY_CLASSES_ROOT\CLSID\{A5522875-B817-4B52-9244-AD294A10CD46}'
14:07:53 4156 4292 Success. The registry key 'HKEY_CLASSES_ROOT\CLSID\{A5522875-B817-4B52-9244-AD294A10CD46}' is closed.
14:07:53 4156 4292 Converting the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID from string.
14:07:53 4156 4292 Success.
14:07:53 4156 4292 Attempting to get the class object by the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID.
14:07:53 4156 4292 Success.
14:07:53 4156 4292 Creating a new instance of the add-in loader.
14:07:53 4156 4292 Success.
14:07:53 4156 4292 Loading the configuration from the system registry.
14:07:53 4156 4292 Getting the latest CLR version.
14:07:53 4156 4292 The latest CLR version is 'v4.0.30319'.
14:07:53 4156 4292 The configuration has been loaded successfully.
14:07:53 4156 4292 Runtime version: v2.0.50727.
14:07:53 4156 4292 Assembly name: IPMSAddin, PublicKeyToken=D1634B8BD0B49773.
14:07:53 4156 4292 Class name: IPMSAddin.AddinModule.
14:07:53 4156 4292 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
14:07:53 4156 4292 Loading CLR: v4.0.30319.
14:07:53 4156 4292 The CLR v2.0.50727 has been initialized successfully.
14:07:53 4156 4292 WARNING: The .NET Framework version loaded differs from that reqired by the assembly.
Posted 21 May, 2010 07:49:52 Top
Eugene Astafiev


Guest


Hi Alexander,

It looks like you forgot to replace the adxloader.dll in the Loader folder of your project with a new one. Please download a fresh version of the http://www.add-in-express.com/files/projects_pub/beta2fix/adxloader.zip.
Posted 21 May, 2010 08:01:36 Top
Alexander Schweighofer




Posts: 28
Joined: 2009-06-02
Hello Eugene!

Thanks for the quick reply!

After replacing the adxloader.dll in the loader directory and recreating the setup I'm facing a new problem:

On a machine having .net 4.0 installed, the setup fails while on a machine without .net 4.0 everything works as expected.

Any ideas?

adxloader.log output:
----------------
Loader version: 5.2.2027
------------------
15:25:49 840 4700 Starting the add-in unregistration process.
15:25:49 840 4700 Getting the latest CLR version.
15:25:49 840 4700 The latest CLR version is 'v4.0.30319'.
15:25:49 840 4700 Loading CLR: v4.0.30319.
15:25:49 840 4700 Calling GetCLRMetaHost method.
15:25:49 840 4700 Success.
15:25:49 840 4700 Calling GetRuntime method.
15:25:49 840 4700 Success.
15:25:49 840 4700 Calling GetInterface method.
15:25:49 840 4700 The GetInterface method returned 'No such interface supported'
15:25:49 840 4700 Calling GetInterface method for the CorRuntimeHost interface.
15:25:49 840 4700 Success.
15:25:49 840 4700 Starting CLR...
15:25:49 840 4700 Success.
15:25:49 840 4700 The CLR v4.0.30319 has been initialized successfully.
15:25:49 840 4700 Creating a new domain setup.
15:25:49 840 4700 Success.
15:25:49 840 4700 Getting the add-in directory.
15:25:49 840 4700 Success. The directory is 'C:\Users\...'
15:25:49 840 4700 The configuration file is 'C:\Users\.. .\app.config'
15:25:49 840 4700 The 'shadow copy' is disabled.
15:25:49 840 4700 Creating a new application domain.
15:25:49 840 4700 Success.
15:25:49 840 4700 Getting the base directory for the domain.
15:25:49 840 4700 Success. The directory is 'C:\Users\...'.
15:25:49 840 4700 Searching for the Add-in Express core library.
15:25:49 840 4700 Success. The 'AddinExpress.MSO.2005.dll' file has been found.
15:25:49 840 4700 Creating an instance of the 'AddinExpress.MSO.ADXLoaderSupport' class.
15:25:49 840 4700 Assembly identity is 'AddinExpress.MSO.2005'.
15:25:49 840 4700 Success.
15:25:49 840 4700 Unwrapping the instance of the 'AddinExpress.MSO.ADXLoaderSupport' class.
15:25:49 840 4700 Success.
15:25:49 840 4700 Creating an instance of the XML parser class.
15:25:49 840 4700 Success.
15:25:49 840 4700 Loading the manifest file (C:\Users\.. .\adxloader.dll.manifest).
15:25:49 840 4700 Success.
15:25:49 840 4700 Getting the root element of the manifest (C:\Users\.. .\adxloader.dll.manifest).
15:25:49 840 4700 Success.
15:25:49 840 4700 Getting the 'assemblyIdentity' element of the manifest (C:\Users\.. .\adxloader.dll.manifest).
15:25:49 840 4700 Success.
15:25:49 840 4700 Searching for the 'name' attribute of the 'assemblyIdentity' element.
15:25:49 840 4700 Success. The name is 'IPMSAddin, PublicKeyToken=d1634b8bd0b49773'.
15:25:49 840 4700 Calling the managed procedure to unregister the 'IPMSAddin, PublicKeyToken=d1634b8bd0b49773' assembly.
15:25:49 912 Connecting to the application domain of the Add-in Express loader.
15:25:49 912 Success.
15:25:49 912 Loading the 'IPMSAddin, PublicKeyToken=d1634b8bd0b49773' assembly.
15:25:49 912 Success.
15:25:49 912 Unregistering the 'IPMSAddin, PublicKeyToken=d1634b8bd0b49773' assembly (user).
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.ServiceClasses.ServiceResponse' type.
15:25:49 912 The 'IPMSAddin.ServiceClasses.ServiceResponse' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.IPMSAddinTransferService.Outlook2IPMSServiceService' type.
15:25:49 912 The 'IPMSAddin.IPMSAddinTransferService.Outlook2IPMSServiceService' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.ServiceClasses.OutlookMessage' type.
15:25:49 912 The 'IPMSAddin.ServiceClasses.OutlookMessage' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.ServiceClasses.Attachment' type.
15:25:49 912 The 'IPMSAddin.ServiceClasses.Attachment' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.UnycomConfigService.ConfigServiceService' type.
15:25:49 912 The 'IPMSAddin.UnycomConfigService.ConfigServiceService' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.IPMSAddinConfigService.IPMSAddinConfigService' type.
15:25:49 912 The 'IPMSAddin.IPMSAddinConfigService.IPMSAddinConfigService' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.IPMSAddinConfigService.RetrieveConfigRequest' type.
15:25:49 912 The 'IPMSAddin.IPMSAddinConfigService.RetrieveConfigRequest' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.IPMSAddinConfigService.RetrieveConfigResponse' type.
15:25:49 912 The 'IPMSAddin.IPMSAddinConfigService.RetrieveConfigResponse' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 The 'IPMSAddin.Helper.MessageHelper+TransmissionType' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.ProtocolDialog' type.
15:25:49 912 The 'IPMSAddin.ProtocolDialog' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.SendToTaskgroupForm' type.
15:25:49 912 The 'IPMSAddin.SendToTaskgroupForm' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 The 'IPMSAddin.SendToTaskgroupForm+SaveAsType' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 The 'IPMSAddin.Helper.FileHelper+SaveAsType' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.ReportForm' type.
15:25:49 912 The 'IPMSAddin.ReportForm' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 The 'IPMSAddin.ReportForm+ReportFormButtons' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 The 'IPMSAddin.ReportForm+MessageType' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.SendToFileForm' type.
15:25:49 912 The 'IPMSAddin.SendToFileForm' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.IpasException' type.
15:25:49 912 The 'IPMSAddin.IpasException' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Unregistering the 'IPMSAddin.Parser.FileReferenceParser' type.
15:25:49 912 The 'IPMSAddin.Parser.FileReferenceParser' type has been registered successfully.
15:25:49 912 Searching for static methods that contain the 'ComRegisterFunction' attribute.
15:25:49 912 Calling the 'AddinUnregister' static method.
15:25:49 912 Error: Exception has been thrown by the target of an invocation.
15:25:49 912 Inner Exception: Exception has been thrown by the target of an invocation.
15:25:49 912 The managed unregistration process is complete with HRESULT = 2.
15:25:49 840 4700 Das System kann die angegebene Datei nicht finden.
Posted 21 May, 2010 08:23:06 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Alexander,

Did you add any code to the add-in constructor? If so, please move to the AddinInitialize event handler.
Posted 21 May, 2010 10:46:39 Top
Alexander Schweighofer




Posts: 28
Joined: 2009-06-02
Hello Sergey!

No, there is no code in the constructor, in fact, i did not change anything.

I made some tests:

created setup.msi with the new Addin express version installed ... ok
installation of the add-in an a client having .net 3.5 installed ... ok
installing of .net 4.0 on the same client ... ok, add-in is still working as expected

deinstallation of the addin ... ok
reinstallation of the add-in ... setup failed (rollback at the end, see adxloader.log above)
deinstallation of .net 4.0 ... ok
reinstallation of the add-in ... ok
Posted 25 May, 2010 01:10:12 Top
Eugene Astafiev


Guest


Hi Alexander,

Could you reproduce the issue with a newly created add-in?
Posted 25 May, 2010 04:18:25 Top
Alexander Schweighofer




Posts: 28
Joined: 2009-06-02
Hello!

if i create a new add-in, i am facing another problem:

setup works, outlook add-in installed successfully
starting outlook ... add-in is not there
trust center .. add-in listed as active

adxloader.log:
Add-in Express Loader Log File: 05/25/2010 13:27:05

Startup directory: C:\Users\jst\AppData\Roaming\Default Company Name\MyAddin2Setup\
Loader version: 5.2.2024
------------------
13:27:05 5252 1840 Start.
13:27:05 5252 1840 Reading the registry key 'HKEY_CLASSES_ROOT\CLSID\{120036F6-00B7-4E79-90F1-9F57A5875D33}'
13:27:05 5252 1840 Success. The registry key 'HKEY_CLASSES_ROOT\CLSID\{120036F6-00B7-4E79-90F1-9F57A5875D33}' is closed.
13:27:05 5252 1840 Converting the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID from string.
13:27:05 5252 1840 Success.
13:27:05 5252 1840 Attempting to get the class object by the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID.
13:27:05 5252 1840 Success.
13:27:05 5252 1840 Creating a new instance of the add-in loader.
13:27:05 5252 1840 Success.
13:27:05 5252 1840 Loading the configuration from the system registry.
13:27:05 5252 1840 Getting the latest CLR version.
13:27:05 5252 1840 The latest CLR version is 'v4.0.30319'.
13:27:05 5252 1840 The configuration has been loaded successfully.
13:27:05 5252 1840 Runtime version: v2.0.50727.
13:27:05 5252 1840 Assembly name: MyAddin2, PublicKeyToken=A51B15AAE540E09A.
13:27:05 5252 1840 Class name: MyAddin2.AddinModule.
13:27:05 5252 1840 Attempting to create a new instance of the managed add-in class: CLR - v2.0.50727
13:27:05 5252 1840 Loading CLR: v2.0.50727.
13:27:05 5252 1840 Calling GetCLRMetaHost method.
13:27:05 5252 1840 Failed.
13:27:05 5252 1840 The loader will try to use the old Framework API.
13:27:08 5252 1840 The CLR v2.0.50727 has been initialized successfully.
13:27:08 5252 1840 Creating a new domain setup.
13:27:08 5252 1840 Success.
13:27:08 5252 1840 Getting the add-in directory.
13:27:08 5252 1840 Success. The directory is 'C:\Users\jst\AppData\Roaming\Default Company Name\MyAddin2Setup\'
13:27:08 5252 1840 The configuration file is 'C:\Users\jst\AppData\Roaming\Default Company Name\MyAddin2Setup\app.config'
13:27:08 5252 1840 The 'shadow copy' is enabled.
13:27:08 5252 1840 Creating a new application domain.
13:27:08 5252 1840 Success.
13:27:10 5252 1840 Unwrapping the managed class.
13:27:10 5252 1840 Success.
13:27:10 5252 1840 Querying the add-in extensibility.
13:27:10 5252 1840 Querying the custom task panes.
13:27:10 5252 1840 Querying the ribbon extensibility.
13:27:10 5252 1840 Success.
13:27:10 5252 1840 Querying the form regions.
13:27:10 5252 1840 Success.
13:27:10 5252 1840 Getting the dispid of the 'Dispose' method.
13:27:10 5252 1840 Success.
13:27:10 5252 1840 The managed add-in class has been created successfully.
Posted 25 May, 2010 06:37:16 Top
Eugene Astafiev


Guest


Hi Alexander,

starting outlook ... add-in is not there


Do you register the add-in for all users?
Posted 25 May, 2010 07:05:14 Top
Alexander Schweighofer




Posts: 28
Joined: 2009-06-02
Hi!

i've tried both, there is no difference, add-in doesn't show up!
Posted 25 May, 2010 07:16:02 Top
Eugene Astafiev


Guest


Alexander,

Please download and install a fresh build of Add-in Express. You can download it http://www.add-in-express.com/files/adx5netsetup/adxnet-v502-b2028-vs-pre.zip.

BTW Don't forget to replace the adxloader.dll in the Loader folder of your existing project with a new one.
Posted 25 May, 2010 07:19:46 Top