none
"Rebuild All Failed" errors related to Microsoft.VisualStudio.Tools.Office.BuildTasks assembly RRS feed

  • Question

  • Hello, I am seeing various errors compiling a Visual Studio 2010 VSTO solution. It's a Word add-in created in Visual Studio 2010, targeting Word 2013. This solution compiled fine only a few weeks ago, and I'm pretty sure that nothing has changed since then other than Windows updates. I have run a repair on Visual Studio 2010 and VSTO Runtime.

    Yesterday, the error was:

    Error 2 The "InitializeDefaultProperties" task could not be loaded from the assembly Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly 'Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

    Today, I'm seeing a slight variation, but very similar error:

    Error 1 The "SetInclusionListEntry" task could not be loaded from the assembly Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly 'Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

    As a result, I can no longer get the solution to compile on this machine. (Note: It compiles fine on a different dev machine that I use for creating builds, so it must be something wrong w/the configuration of the particular machine.)

    Another thing that I noticed (not sure if it's related but I am interested to know why this happens): When I initially opened the solution there were hundreds of errors regarding mismatched references w/the Microsoft.Office.Interop assembly. For instance, errors like "Option Strict On disallows implicit conversions from 'Microsoft.Office.Interop.Word.Document' to 'Microsoft.Office.Interop.Word.Document'". I ended up resetting all the references which were pointing to Version 14.0.0.0 (Office 2010 PIAs) so that they instead use Version 15.0.0.0 (Office 2013 PIAs). This corrected the errors, however, I don't believe I should have to do this - I want to retain the references to the lower version Office 2010 PIAs because I compile the final MSI on a build machine that has Office 2010 but not Office 2013 installed. That has always worked fine and I would like to keep it that way. But I would like to get to the bottom of what caused this, because as I mentioned this solution worked fine a few weeks ago and I can't think of anything that would have changed to break the Word interop compatibility.

    Any pointers are greatly appreciated. Thanks!


    • Edited by wordyone Friday, April 18, 2014 4:40 PM added add'l info
    Friday, April 18, 2014 4:27 PM

Answers