none
Office Ribbons won't load after installing Visual Studio 11 Developer Preview

    Question

  • After installing Visual Studio 11 Developer Preview, my Office AddIns that contain ribbons will no longer load. I get the following error:

    Error 4  The "FindRibbons" task could not be loaded from the assembly Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.  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.

    This is true whether I run version 11 or version 2010 of Visual Studio so it seems as though the installation corrupted some references in my version 2010, but I don't know how to tell which these are.

    I did notice that a new version of BuildTasks has been installed. If I run: gacutil /l | find /i "Microsoft.VisualStudio.Tools.Office.BuildTasks" then I see a BuildTasks version for 11.0.0.0 as well as 10.0.0.0 but I don't know if that has any effect.

    Any help would be appreciated in getting these projects to compile again.
    Thanks,
    Ken





    • Edited by gouldingken Monday, October 10, 2011 7:45 PM
    Monday, October 10, 2011 7:43 PM

Answers

All replies

  • Hi Ken,

     

    Welcome to the MSDN forum.

     

    I believe your hypothesis is reasonable. Did you open your previous project in Visual Studio 11?

     

    If you did, I recommend you try create a new project in Visual Studio 11 and add the reference “Microsoft.VisualStudio.Tools.Office.BuildTasks”. Or you can try refresh the reference of your solution in Visual Studio 11.

     

    If you have any other concerns, please feel free to let me know.

     

    Best Regards,


    Alexander Sun [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.


    Wednesday, October 12, 2011 7:03 AM
  • It happens with any Excel AddIn project whether I have opened it in VS 11 or not. If I create a brand new Excel 2010 Add-in project, and then try to compile it without doing anything else, I still get the error.

    The Microsoft.VisualStudio.Tools.Office.BuildTasks reference is not a reference in my project. This is something that MSBuild tasks uses. To quote from another forum:

    "The build process of VSTO projects relies on a number of MSBuild tasks used together with the Microsoft.VisualStudio.Tools.Office.Office2003.targets and Microsoft.VisualStudio.Tools.Office.Office2007.targets files. These tasks register Add-Ins, generate the application and deployment manifest and update the security on the build machine. The assemblies which include these tasks are shipped with Visual Studio." (http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/497324ff-a2e0-428c-bc1a-238db0c3d252/)

    I assume this procedure has changed in the new version of Visual Studio and that after the install it won't work for VS 2010. Is anyone else able to compile an Office Add-In after installing the developer preview?

    Thursday, October 13, 2011 2:06 AM
  • Hi Ken,

     

    You are right. Have you tried create an Excel AddIn project and copy your previous code and project to this solution? Does this method work?

     

    If you have any other concerns, please feel free to let me know.

     

    Best Regards,


    Alexander Sun [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, October 13, 2011 6:12 AM
  • Even an empty AddIn project had this problem.

    Did a full reinstall to fix it...

    • Marked as answer by Alexander Sun Friday, October 14, 2011 3:15 AM
    Thursday, October 13, 2011 5:34 PM
  • Hi all, I recently installed the last release of visual studio 11 developer preview and also got this issue.

    I didn't open a 2010 project with the 11 version, and I decided to go bak and uninstall it.

    Still, the problem remains. Any help?

    Tuesday, March 06, 2012 12:53 PM
  • Allright, I could solve it by restoring the file Microsoft.VisualStudio.OfficeTools.targets 

    Wednesday, March 07, 2012 2:42 PM
  • I have the same issue after installing VS2011, my VS2010 project failed to compiling.

    Restoring the file Microsoft.VisualStudio.OfficeTools.targets  can solve my problem.

    Wednesday, March 14, 2012 7:06 AM
  • Could you please explain how you restored Microsoft.VisualStudio.OfficeTools.targets file?

    The file is in my C:\Program Files\MSBuild\ folder, but still it does not work.


    Wednesday, March 14, 2012 7:20 PM
  • I have the same issue after installing VS2011, my VS2010 project failed to compiling.

    Restoring the file Microsoft.VisualStudio.OfficeTools.targets  can solve my problem.

    For those who encounter this problem, goto C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\OfficeTools and open the Microsoft.VisualStudio.Tools.Office.targets file.

    Replace all 10.0.0.0 with 11.0.0.0

    Thanks @GaryLiu1971 and @German Buzzi for saving my time.. :)

    • Proposed as answer by VidarMa Wednesday, October 31, 2012 1:29 PM
    Wednesday, May 30, 2012 1:05 PM
  • If you have a 64-bit OS, the path above is "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\OfficeTools".

    This solution worked for me after installing VS 2012 side-by-side with VS 2010 and rebuilding a Word Add-on in VS 2010.

    Wednesday, February 13, 2013 10:15 PM
  • I migrated a project from VS2008 tot 2012 and this was also my solution
    Friday, June 21, 2013 10:29 AM
  • When I do this I get a new error as follows

    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. MineTech.Apps.Excel2010Addin


    • Edited by Amavi Tuesday, December 16, 2014 5:37 AM
    Tuesday, December 16, 2014 4:46 AM