c# - How to develop Microsoft office word addin for 64bit version office in vs2010 -


i have developed addin word in vs2010.it's working cool in 32 bit version of office, not working on 64bit version of office .searched lot , found

for 64-bit root\software\microsoft\office\application name\addins\add-in id 32-bit root\software\wow6432node\microsoft\office\application name\addins\add-in id 

registry information path's.i tried register information 64bit.even not working in 64 bit of office. in 64 bit office addin displaying under inactive application add-ins.i tried enabling it.

how develop , deploy addin 64 bit of office..?

and getting following error ..!!

could not load file or assembly 'xxxxx, version=1.0.0.0, culture=neutral, publickeytoken=null' or 1 of dependencies. attempt made load program incorrect format.

************** exception text ************** system.badimageformatexception: not load file or assembly 'xxxxx, version=1.0.0.0, culture=neutral, publickeytoken=null' or 1 of dependencies. attempt made load program incorrect format. file name: 'xxxxx, version=1.0.0.0, culture=neutral, publickeytoken=null'

 @ myword.thisaddin.thisaddin_startup(object sender, eventargs e)    @ myword.thisaddin.finishinitialization() 

at microsoft.visualstudio.tools.office.runtime.domaincreator.executecustomization.executephase(executionphases executionphases) @ microsoft.visualstudio.tools.office.runtime.domaincreator.executecustomization.microsoft.visualstudio.tools.office.runtime.interop.iexecutecustomization2.executeentrypoints() wrn: assembly binding logging turned off. enable assembly bind failure logging, set registry value [hklm\software\microsoft\fusion!enablelog] (dword) 1. note: there performance penalty associated assembly bind failure logging. turn feature off, remove registry value [hklm\software\microsoft\fusion!enablelog].

an attempt made load program incorrect format

in 99% of cases, means 1 thing when exception raised in 64-bit program. "incorrect format" dll contains 32-bit code. cannot work, 64-bit program can load 64-bit dlls.

if used c# write add-in simple fix. right-click project in solution explorer window, properties, build tab. set "platform target" anycpu. untick "prefer 32-bit" checkbox if see (vs2012 , up). repeat release configuration.


other possible explanations this, unusual cases:

  • not having 64-bit version of .net framework installed
  • writing code in c++/cli language, have build x64 version
  • having dependency on 32-bit unmanaged dll
  • accidentally loading wrong dll

you'll need sysinternals' process monitor chase these kind of mishaps down. trace shows dlls office program looking , in directories looked dll. big trace, work bottom of trace backwards.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -