none
VSTO Projects compiled in VS 2005 and VS 2010 RRS feed

  • Question

  • I have a working add-in developed in VS 2005 - adds a menubar item in excel.

    When I moved to VS 2010 - I didn't change anything - build - the add-in won't work - menu won't add. LoadBehavior will turn to 2. I tried replacing the Add-in assembly with the VS 2005 compile, and it works. Set-up is the same for both, just the assembly compiled from two different VS.

     

    My setup deployment project has been working ever since. Just these add-in assemblies compiled in VS 2010 doesnt work.

     

    Any advise?

     

    Thanks!

    Michael


    Let it be let it be
    Friday, October 7, 2011 8:56 PM

Answers

  • Hi Michael,

     

    Thanks for posting in the MSDN Forum.

     

    Would you please clarify some options for further research:

     

    1.         Does your add-in work with Office 2003? According to you description I think your add-in works under Office 2003. Is it right?

    2.         As far as I know, Visual Studio will not support Office 2003 add-in’s development, So you add-in project will be changed to support Office 2007 or Office 2010. And in Office 2007 or Office 2010 menubar will not exist, ribbon will instead it. If you add-in works fine under such environment, your customized menubar will become a group under “Add-Ins” tab.

    3.         Do you try to install the add-in deployment which you created under VS 2005 to see whether it works fine?

    4.         As you mentioned the LoadBehavior will become 2, would you please show your snippet of your project for further trouble shooting?

     

    Have a good dday,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by The Mann Friday, January 13, 2012 4:00 PM
    Tuesday, October 11, 2011 5:25 AM
    Moderator

All replies

  • Hi Michael,

     

    Thanks for posting in the MSDN Forum.

     

    Would you please clarify some options for further research:

     

    1.         Does your add-in work with Office 2003? According to you description I think your add-in works under Office 2003. Is it right?

    2.         As far as I know, Visual Studio will not support Office 2003 add-in’s development, So you add-in project will be changed to support Office 2007 or Office 2010. And in Office 2007 or Office 2010 menubar will not exist, ribbon will instead it. If you add-in works fine under such environment, your customized menubar will become a group under “Add-Ins” tab.

    3.         Do you try to install the add-in deployment which you created under VS 2005 to see whether it works fine?

    4.         As you mentioned the LoadBehavior will become 2, would you please show your snippet of your project for further trouble shooting?

     

    Have a good dday,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by The Mann Friday, January 13, 2012 4:00 PM
    Tuesday, October 11, 2011 5:25 AM
    Moderator
  • Hi Michael,

    Tom_Xu’s reply asks you to clarify some options for further research.

    Here are some other thoughts that may help you understand and/or resolve the problem.

    Your statement of your problem omits how you build your add-in. Is it a COM add-in which implements IDTExtensibility 2 directly from your code, is it an Automation add-in or is it built with Visual Studio Tools for Office (VSTO)?

    You can use the Microsoft Office developer tools (VSTO) to develop Office solutions for Microsoft Office 2010 as well as the 2007 Microsoft Office system. Visual Studio 2010 includes new project templates for creating solutions that target Microsoft Office 2010. Additionally, you can create solutions for 32-bit and 64-bit versions of Microsoft Office 2010. For more information, see Designing and Creating Office Solutions.

    Other content that may be germane to your issue include

    Migrating Office Solutions to the .NET Framework 4
    http://msdn.microsoft.com/en-us/library/ee207231.aspx

    Updating Excel and Word Projects that you Migrate to the .NET Framework 4
    http://msdn.microsoft.com/en-us/library/ee712587.aspx

    Please help us by sharing more information about your project.

    Regards,
    Chris Jensen
    Senior Technical Support Lead

    • Edited by cjatmsModerator Thursday, October 13, 2011 4:56 PM
    • Proposed as answer by Bruce Song Thursday, October 20, 2011 12:32 PM
    Thursday, October 13, 2011 4:56 PM
    Moderator
  • Sorry for replying so late. I just didn't get a notification.

    I was able to make some workaround. Visual Studio 2010 can't compile add-ins for Office 2003, that's it. I found a documentation on this on which supports what.

    Right now, I need to compile my add-ins (VSTO built) in Visual Studio 2008 to make it work on Office 2003 up to Office 2010 32-bit. Yes, to make it work in Office 2010 64-bit it has to be built under Visual Studio 2010. I can't do that right now because there are some users still using Office 2003 which won't work if I make that change.

    Thanks guys!


    Let it be let it be
    Friday, January 13, 2012 4:05 PM