构建错误+为excel 2010创建VSTO插件

San*_*pku 4 msbuild vsto msbuild-task excel-addins excel-2010

我尝试使用VS 2010创建一个excel加载项.当我创建一个新项目Excel 2010 Addin时,尝试编译该解决方案.我收到一个错误.

'Error  1   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.   DemoExcelAddIn1
Run Code Online (Sandbox Code Playgroud)

我下载了一个用于办公室运行时的VS 2010工具.但我找不到程序集'Microsoft.VisualStudio.Tools.Office.BuildTasks,

我该怎么办?谁能帮忙..

Sli*_*SFT 9

这看起来像是来自MSDN论坛已知问题 - 您只需要将Microsoft.VisualStudio.Tools.Office.targets文件更新为指向版本11.0.0.0而不是版本10.0.0.0.

更新MSBuild目标文件

对于遇到此问题的用户,请转到C:\ Program Files(x86)\ MSBuild\Microsoft\VisualStudio\v10.0\OfficeTools并打开Microsoft.VisualStudio.Tools.Office.targets文件.

将所有10.0.0.0替换为11.0.0.0.

  • @Shyamsundarshah根据您的评论日期判断您可能安装了VS2013.你需要用`12.0.0.0`替换`10.0.0.0`. (3认同)