I have build a Multi add-in using NetOffice it working fine allover expect on 64 bit installation of Office. Anyone have idea about this all registry entry is going at correct place, still it is showing in Inactive Add-in list with empty path(see attached image)

- 329
- 2
- 17
-
164-bit versions will only load 64-bit addins. Did you compile for 64-bit? – Panagiotis Kanavos Apr 21 '15 at 13:39
-
I compile it for Any CPU & it should word as mentioned in NetOffice documentation. – Hitendra Apr 22 '15 at 04:52
-
Actually, the documentation says that you have to compile for 64 bit `If you develop a COMAddin that is being used by a 64Bit Office application, you have to compile your assembly as x64.` – Panagiotis Kanavos Apr 22 '15 at 06:45
1 Answers
You have to compile your add-in for 64-bit. Native applications like Office can't load dlls for different architectures. This is actually mentioned in the NetOffice documentation, in the section Is NetOffice ready for multiple platforms(32/64 Bit)?:
If you develop a COMAddin that is being used by a 64Bit Office application, you have to compile your assembly as x64. If you wart to support 32Bit and 64Bit Office applications, you may need to provide a second x64-compiled COMAddin. This behaviour is the same in all scenarios(interop,vsto or netoffice). A 64Bit application can only load 64Bit Dll's.
The AnyCPU
architecture means that the assembly can be used by .NET programs targeting any architecture. It doesn't apply to native programs. AnyCPU
is treated as a 32-bit dll in COM and interop scenarios

- 120,703
- 13
- 188
- 236
-
Thanks Panagiotis for well explained answer, It is working after changing platform target: to x64. – Hitendra Apr 22 '15 at 07:08