Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NetOffice - add-in not loading

I'm developing an Outlook add-in using the NetOffice library. It was a nice experience, but lastly I changed my drive, reinstalled windows, office etc. Now my add in doesn't run, and in the "COM Add-Ins" in Outlook options I see: Load Behavior: Not loaded. A runtime error occurred during the loading of the COM Add-in

And this problem is even on the simples example from NetOffice, that is the NetOffice Tools - Simple project, which basically doesn't do anything.

I put in the constructor of the add in a logging code (to a file), but it doesn't run, so even the constructor isn't hit.

Any tips how to troubleshoot it?

EDIT: using AddInSpy I found out, that the Add-in status is: Add-in DLL path is not found. but no idea how to move on with this information.

like image 624
alek kowalczyk Avatar asked Mar 09 '26 15:03

alek kowalczyk


1 Answers

Worked it out! :)

After reinstalling windows, I installed Office 2013 64 bit whereas earlier I had the 32 bit version, that caused a lot of trouble.

To run it on 64 bit:

  • Target 64 bit when compiling the add-in (AnyCPU is not enough!)
  • VS can use the 32 bit regasm, so add to the post build event following line: "%Windir%\Microsoft.NET\Framework64\v4.0.30319\regasm" "$(TargetPath)"

and it works again.

like image 122
alek kowalczyk Avatar answered Mar 11 '26 09:03

alek kowalczyk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!