Build Error: Outlook 2010 VSTO Add-In

I am trying to create a simple Outlook 2010 add-in in Visual Studio 2010. However, the build fails with the following message:

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.

I found a similar question here: Build error + Create VSTO add-on for Excel 2010 . But the problem was that I had an updated version of Visual Studio from 2010 to 2012. And I didn't update.

I also tried to solve this issue:

update the file Microsoft.VisualStudio.Tools.Office.targets

to point to version 11.0.0.0

instead of version 10.0.0.0

.)

But this gives me another error (which obviously needs to happen because I haven't updated it):

The "RegisterFormRegions" 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.

Update: The error still persists after reinstalling Visual Studio 2010 Tools for Office Runtime .

+3


source to share


1 answer


I had the same problem with Visual Studio 2013 and Outlook 2010 and found an MSDN article ( http://msdn.microsoft.com/en-us/library/ms164304.aspx ) which reads:

Starting with Visual Studio 2013 Update version 3, this task has a new signature that allows you to specify the target frame version for the file.



While not specific to VS2012, it looks like the Office versions and targets are very tied to the version of Visual Studio you are building it with. In my case, I had to ensure that I build against VS2013 Update 3 when building against Microsoft.VisualStudio.Tools.Office.targets Version=12.0.0.0

, so you can try this combination if all else fails.

+1


source







All Articles