2
votes

I have a VSTO PowerPoint Add-in project complied with default mode. Which works fine. Now I have to use a reference NeedleSeekAPI.dll, but it seems it was complied with x64 mode.

So the problem is if I choose Any CPU I will have error: Could not load file or assembly 'NeedleSeekAPI' or one of its dependencies. An attempt was made to load a program with an incorrect format.

And if I choose X64 I have another error: Could not load file or assembly 'PPTSearch, Version=1.0.0.0, Culture=neutral' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

I tried to convert my VSTO Add-in project into 64-bit follow this article: http://blogs.msdn.com/b/vsto/archive/2010/04/09/deploying-com-add-ins-for-64-bit-office-using-visual-studio-saaid-khan-for-nathan-halstead.aspx but it is not working as well, I still get the same error. (or do I have to revised my VSTO PPT addin to a Shared-addin?)

I use VS2010 with .NET framework4.

Do you have any suggestion?

1

1 Answers

0
votes

You can try spawning a different process to handle calls to 'NeedleSeekAPI.dll' which is compiled in a different mode. You need to handle inter-process communication, if NeedleSeekAPI.dll is editable you may pass parameters to it when spawning the process.