none
error MSB4018: The "SetInclusionListEntry" task failed unexpectedly. RRS feed

  • Question

  • Hi,

    The following error message appears when I try to build the sample project from Walkthrough: Creating Your First VSTO Add-in for Word (https://msdn.microsoft.com/en-us/library/cc442946.aspx).

    How do I solve this problem?

    EDIT

    When I check "References" in "My Project" there is no list entry for Microsoft.VisualStudio.Tools.Office.Runtime. And neither neither is Microsoft.VisualStudio.Tools.Office.Runtime available in the list which shows up when you click the "Add" button. "Microsoft Office Developer Tools for Visual Studio 2015" is installed.

    Error message

    ------ Rebuild All started: Project: Demo2, Configuration: Debug Any CPU ------
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018: The "SetInclusionListEntry" task failed unexpectedly.
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Tools.Office.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018: File name: 'Microsoft.VisualStudio.Tools.Office.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018:    at Microsoft.VisualStudio.Tools.Office.BuildTasks.SetInclusionListEntry.Execute()
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018:
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018: WRN: Assembly binding logging is turned OFF.
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018: To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018: Note: There is some performance penalty associated with assembly bind failure logging.
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018: To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(673,9): error MSB4018:
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========



    • Edited by Lugaxx Sunday, October 11, 2015 11:35 AM
    Saturday, October 10, 2015 7:34 PM

All replies

  • Hi Lugaxx,

    >> The following error message appears when I try to build the sample project from Walkthrough: Creating Your First VSTO Add-in for Word (https://msdn.microsoft.com/en-us/library/cc442946.aspx).

    What your Office version and VS version? Did you test this under VS2015?

    Did you follow the document step by step? I add an add-in for word under vs2015, rebuild it directly, it worked correctly. Based on your error message, did you manually add reference 'Microsoft.VisualStudio.Tools.Office.Runtime.v9.0’, if you have, I suggest you remove it. You do not need to add Microsoft.VisualStudio.Tools.Office.Runtime manually. If you develop Office add-in, the related reference would be added automatically if you use VS2015.

    Best Regards,

    Edward


    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.


    Monday, October 12, 2015 3:31 AM
  • Hi Edward,

    I use Office 365 ProPlus and Visual Studio Community 2015.

    I have tried different NET Frameworks for my project: NET Framework 4.5.2 and NET Frameword 4.6.

    Also I have installed Office Developer Tools for Visual Studio 2015 via Web Platform Install 5.0.

    When I create a new Word add-in project, the wizard does not include Microsoft.VisualStudio.Tools.Office.Runtime to my project. And I cannot add it manually since it does not appear in the list. I have tried to search my hard disk for a corresponding file. But it seems not to exist at all.

    There is no difference between VB and C# - in both cases the build process fails with the same error message.

    I have already tried to repair my installations of both Office and VS.

    I have checked the Windows update manager to make sure that there are no pending updates.

    Now my last hope is Visual Studio Professional 2013.

    Best regards,

    Lukas

    EDIT

    I have just finished installing Visual Studio Professional 2013, but the development tools for Office have failed to install. What could be the reason for that?

    Setup Complete.
    However, not all features installed correctly.

    Microsoft Visual Studio 2010 Tools for Office Runtime (x86)
    Package failed.

    Microsoft Offie 2013 Developer Tools for Microsoft Visual Studio (x86) - ENU Language Pack
    Package failed.


    • Edited by Lugaxx Monday, October 12, 2015 7:47 PM
    Monday, October 12, 2015 11:10 AM
  • Hi Lugaxx,

    If you just do as below, will you get this error?

    1. Create a new project with Word add-in under VS2015
    2. Build the project

    Best Regards,

    Edward


    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.


    Tuesday, October 13, 2015 9:24 AM
  • Hi Edward,

    yes, this is exactly what I do. But the error message appears as soon as I try to compile the code.

    Best regards,

    Lukas

    Tuesday, October 13, 2015 10:08 AM
  • Hi Lukas,

    I made a test under VS2015 community and Office Developer Tools for Visual Studio 2015 via Web Platform Install 5.0. I get the same error like yours. I suggest you submit a feedback in the link below:

    Reference: http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx

    >> I have just finished installing Visual Studio Professional 2013, but the development tools for Office have failed to install. What could be the reason for that?

    Before installing VS 2013, I suggest you remove the VS 2015 community and Office Developer Tools for Visual Studio 2015.

    Best Regards,

    Edward


    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.



    Thursday, October 15, 2015 9:48 AM