VS2008(File > New Project > Others Project Types > Extensibility > Shared Add-in) working on 32 bit Office, but not working on 64 bit Office. RRS feed

  • Question

  • Type: critical issue



    OS : - Windows xp sp2/7

    IDE : - Visual Studio 2008

    Word: MS Office 2007, MS Office 2010, MS Office 2013

    Language : - VB .net

    Project type : - File --> New Project --> Others Project Types -->Extensibility --> Shared Add-in



    Problem Description: We have developed Add Ins program for(Word, Excel, Outlook and Power Point)in a integrated installer created by VS 2008 itself which works perfectly on 32 bit Office version.


    Add Ins Work -   It creates a command button on toolbar, then after we start our customized work.

    But as of now, we have received requirement to deliver same component on 64 bit office. We have installed it, but it is not showing any button on word.


    Kindly assist us, what are the changes, I should make in existing program for making it work on 64 bit Office.


    I will be really thankful.

    Regards, S.P Singh

    Tuesday, March 22, 2016 8:39 AM

All replies

  • Hello Singh,

    Make sure that you created the required windows registry keys.

    See Deploying COM Add-ins for 64-bit Office using Visual Studio  for more information.

    Tuesday, March 22, 2016 9:19 AM
  • Thanks Eugene, I will check this and update you, if I will face any issue.

    Regards, S.P Singh

    Monday, March 28, 2016 4:07 AM
  • Hi Eugene,

    I created registry entry according  to article, and building project on a 64 bit machine with VS 2008, but project is not building; I have made changes in project according to below article, but still project is not building.

    Kindly assist.

    “An attempt was made to load an assembly with an incorrect: C:\Users\Administrator\Desktop\Client Deployment\AddIns\Addins\obj\x64\Release\AddIns.dll”

    Kindly assist. I will be really thankful.

    Regards, S.P Singh

    • Edited by S.P Singh Saturday, April 2, 2016 7:25 AM Additional info added
    Saturday, April 2, 2016 7:17 AM
  • Try to remove the post-build action. Does it help?
    Saturday, April 2, 2016 8:38 AM
  • No, it is not building. I tried first without post build action and after that I wrote post build action, but in both cases, it did not worked.

    Regards, S.P Singh

    Saturday, April 2, 2016 6:05 PM
  • Hi Eugene,

       One thing I noticed that reference files are still pointing to 32 bit frame work. I tried to change it but no success, kindly suggest.

    You can check build command: - 

    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64\sgen.exe /assembly:C:\Users\Administrator\Desktop\AddIns\AddIns\obj\x64\Release\AddIns.dll /proxytypes /reference:"C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\Extensibility.dll" /reference:C:\Users\Administrator\Desktop\AddIns\AddIns\bin\x86\Release\Interop.NGAUTHENTICATIONLib.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.VisualBasic.Compatibility.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.VisualBasic.Compatibility.dll /reference:C:\Windows\assembly\GAC_MSIL\office\\office.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Configuration.Install.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:C:\Windows\assembly\GAC_MSIL\Office\\Office.dll /reference:C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Excel\\Microsoft.Office.Interop.Excel.dll /reference:C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Outlook\\Microsoft.Office.Interop.Outlook.dll /reference:C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.PowerPoint\\Microsoft.Office.Interop.PowerPoint.dll /reference:C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Word\\Microsoft.Office.Interop.Word.dll /reference:C:\Windows\assembly\GAC\stdole\7.0.3300.0__b03f5f7f11d50a3a\stdole.dll /reference:C:\Windows\assembly\GAC_MSIL\Microsoft.Vbe.Interop\\Microsoft.Vbe.Interop.dll 

    If you want, I can share a sample project, which will look similar and create button on MS office application, but only will work with 32 bit. If somehow sample program convert into 64 bit and works on 64 bit Office. Then I will get the resolution and It will save maintenance cost to develop another program on 64 bit.

    Kindly assist us, what are the changes, I should make to work on 64 bit Office.


    I will be really thankful.

    Regards, S.P Singh

    Monday, April 4, 2016 3:00 PM
  • On Scanning exception in detailed, I found following: - 

    The "SGen" task is using "sgen.exe" from "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\sgen.exe".
        Microsoft (R) Xml Serialization support utility
        [Microsoft (R) .NET Framework, Version 2.0.50727.1432]
        Copyright (C) Microsoft Corporation. All rights reserved.
        SGEN : error : An attempt was made to load an assembly with an incorrect format: C:\AddIns\Client Deployment\AddIns\AddIns\obj\x64\Release\AddIns.dll.
          - Could not load file or assembly 'AddIns, Version=1.0.5940.30498, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

    As, I can check. x64 is using 32 bit tool, while in machine same tool is available in x64

    C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\sgen.exe
    C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\sgen.exe

    Kindly suggest.

    Regards, S.P Singh

    • Edited by S.P Singh Wednesday, April 6, 2016 1:35 PM Added more description
    Wednesday, April 6, 2016 1:33 PM
  • Hi S.P Singh,

    Is your issue get resolved or you are still facing some problem regarding that ?

    If your issue get resolved can you able to share the solution with our community so that if other community member have same issue like you then they also can get solution by your post.



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, April 27, 2016 9:44 AM