3

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.

artnib
  • 480
  • 4
  • 7
alek kowalczyk
  • 4,896
  • 1
  • 26
  • 55

1 Answers1

5

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.

alek kowalczyk
  • 4,896
  • 1
  • 26
  • 55
  • Are there any tutorials of putting together *and* debugging a simple Word add-in via NetOffice? I'm really struggling with the lack of documentation...unless I should just be following VSTO documentation since NetOffice seems to be trying to emulate that? – Terry Jul 23 '20 at 00:48