Add in plugin is giving error while clicking on compose

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

Add in plugin is giving error while clicking on compose
Add in plugin is giving error while clicking on compose 
Mishal Parmar


Guest


Hello,

I am getting the following error while click on the compose window. This type of error is occurred in specific customers machines only. We are not getting an error in every customer.

Can you please help me out what could be a problem and its solution?


Exception Type: System.IO.FileLoadException
Exception Message: Could not load file or assembly 'Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. Access is denied.
Exception Target Site: adxOutlookAppEvents1_ExplorerSelectionChange
Stack Trace ----
TNSH.App.AddinModule.adxOutlookAppEvents1_ExplorerSelectionChange(sender As Object, explorer As Object)
TNSH.App.DLL: N 00000 (0x0) JIT
AddinExpress.MSO.ADXOutlookAppEvents.DoExplorerSelectionChange(explorer As Object)
TNSH.App.DLL: N 0018 (0x12) IL

Exception Source: 
Exception Type: AddinExpress.MSO.ADXExternalException
Exception Message: An error has occurred in the code of the add-in.
Posted 30 Apr, 2019 09:19:18 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Mishal,

This may relate to Office being updated right in this moment. We suggest that you 1) use embedded interops (in this case you don't need to deploy them) and 2) run the .NET Framework Repair Tool on that machine.


Andrei Smolin
Add-in Express Team Leader
Posted 01 May, 2019 03:37:25 Top
Mishal Parmar


Guest


Hello Andrew,

Thank you so much for your support. Problem is solved with the ".NET Framework Repair Tool on that machine." We got a response from a customer that error is no more exist now.


regards
Mishal Parmar
Posted 11 May, 2019 01:45:31 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Thank you for letting us know!


Andrei Smolin
Add-in Express Team Leader
Posted 13 May, 2019 03:28:02 Top
Mishal Parmar


Guest


Hello Andrew,

Issue sometime stil occurs even after repair .NET Framework. Could please help me with how to embedded interop.
Should I have to embed all interops or only Outlook Interop.

1) use embedded interops (in this case you don't need to deploy them)




Assembly Full Name: xxxx, Version=2.2.1.0, Culture=neutral, PublicKeyToken=null
Assembly Version: 2.2.1.0

Exception Source: xxxxx
Exception Type: System.IO.FileLoadException
Exception Message: Could not load file or assembly 'Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=xXXXX' or one of its dependencies. Access is denied.
Exception Target Site: adxOutlookAppEvents1_ExplorerSelectionChange
Stack Trace ----
xxxx.AddinModule.adxOutlookAppEvents1_ExplorerSelectionChange(sender As Object, explorer As Object)
xxxx.DLL: N 00000 (0x0) JIT
AddinExpress.MSO.ADXOutlookAppEvents.DoExplorerSelectionChange(explorer As Object)
xxxx.DLL: N 0018 (0x12) IL

(Outer Exception)
Machine Name: ZOFIA
IP Address: fe80::d406:f44:d605:5386%3
Current User: ZOFIAzwali

Application Domain: C:UsersxxxxxDocumentsxxxx
Assembly Codebase: file:///C:/Users/xxxx/Documents/xxxxx/AddinExpress.MSO.2005.DLL
Assembly Full Name: AddinExpress.MSO.2005, Version=9.2.4635.0, Culture=neutral, PublicKeyToken=xxxxx
Assembly Version: 9.2.4635.0

Exception Source: 
Exception Type: AddinExpress.MSO.ADXExternalException
Exception Message: An error has occurred in the code of the add-in.




Thanks

Mishal Parmar
Posted 13 Jun, 2019 05:13:25 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Mishal,

In Solution Explorer, select an interop reference on your add-in project and set Embed Interop Types = True in the Properties window. Do this on all interops.


Andrei Smolin
Add-in Express Team Leader
Posted 13 Jun, 2019 06:30:21 Top
Mishal Parmar


Guest


Hello Andrei,

I have tried to Embed Interop as you mention.
In Solution Explorer, select an interop reference on your add-in project and set Embed Interop Types = True in the Properties window.


[img]http://prntscr.com/o2saec[/img]

While building project I am getting below error.

[img]http://prntscr.com/o2saob[/img]

Could you please help me out why this error came?
Is there anything missing from my end for setting to Embed Interop?

Thanks

Mishal Parmar
Posted 17 Jun, 2019 02:19:35 Top
Mishal Parmar


Guest


Hello Andrei,


After adding Microsoft.CSharp dll as a reference issue was solved. Before embed interop, there was not showing Microsoft.CSharp dependency for the project. Now it was required to use that.

It was an error while I am using PropertyAccessor.


Any changes required apart from Microsoft.CSharp dll add as a reference.

Thanks

Mishal Parmar
Posted 17 Jun, 2019 03:38:40 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Mishal,

Thank you for sharing the solution with forum readers!


Andrei Smolin
Add-in Express Team Leader
Posted 17 Jun, 2019 04:45:36 Top