none
Compilation Error in Blank Word 2010 Add-In RRS feed

  • Question

  • Hi,

    For some strange reason, a blank Word 2010 Add-in created in Visual Studio 2010 does not compile.

    I get the following warning:

    Namespace or type specified in the project-level Imports 'Microsoft.Office.Tools.Word.Extensions' doesn't contain any public member or cannot be found.

    I assume the other errors are related to this one.

     

    I have a similar error when creating a blank Excel Add-In.

     

    I have Word 2010, Visual Studio 2010 Professional and Visual Studio 2008 Installed on my computer. I just reinstalled Visual Studio 2010.

     

    Thank you for your help.

     

    Benoit

    Sunday, August 21, 2011 2:30 PM

Answers

  • Hi Benoit

    Which .NET Framework are you selecting when you create the project: 3.5 or 4.0?

    I saw this the other day when selecting 3.5 for an Office 2010 project. Since I didn't intend to use the "Extensions" namespace I just went to every marked error in the list and commented it out...

    See also this article in the MSDN documentation:
    http://msdn.microsoft.com/en-us/library/cc442981.aspx

    I didn't look at the problem any more closely, because I was pressed for time, but I think the issue would be that certain libraries aren't referenced when building the add-in, but the Imports (using for C#) are added.


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bruce Song Tuesday, August 30, 2011 7:18 AM
    Sunday, August 21, 2011 5:17 PM
    Moderator

All replies

  • Hi Benoit

    Which .NET Framework are you selecting when you create the project: 3.5 or 4.0?

    I saw this the other day when selecting 3.5 for an Office 2010 project. Since I didn't intend to use the "Extensions" namespace I just went to every marked error in the list and commented it out...

    See also this article in the MSDN documentation:
    http://msdn.microsoft.com/en-us/library/cc442981.aspx

    I didn't look at the problem any more closely, because I was pressed for time, but I think the issue would be that certain libraries aren't referenced when building the add-in, but the Imports (using for C#) are added.


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bruce Song Tuesday, August 30, 2011 7:18 AM
    Sunday, August 21, 2011 5:17 PM
    Moderator
  • Hi Benoit,

    What is the status of the problem on your side? Does the suggestion help you? If you still need any assistant, just feel free to let us know.

    Best Regards,


    Bruce Song [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.

    Thursday, August 25, 2011 7:47 AM