“调用的目标已抛出异常."构建 Visual Studio 2010 VSPackage 时 [英] "Exception has been thrown by the target of an invocation." when building a Visual Studio 2010 VSPackage

查看:21
本文介绍了“调用的目标已抛出异常."构建 Visual Studio 2010 VSPackage 时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近为一些 Visual Studio 扩展(菜单栏/命令)创建了几个 VSPackage.我昨天正确编译了它们,签入了 TFS(我是唯一一个接触这个项目的人,仅供参考).我已经安装了这些扩展并且工作正常.今天它不编译!我收到以下错误:

I recently create a couple of VSPackages for some Visual Studio extensions (menu bar/command). I compiled them correctly yesterday, checked into TFS (i'm the only one touching this project, FYI). I had already installed these extensions and were working fine. Today it doesn't compile! I get the following error:

调用的目标已抛出异常.

这并没有告诉我任何事情,所以我使用以下命令启动了 Visual Studio:

This doesn't tell me anything, so i fired up Visual Studio with the following command:

devenv.exe/Rebuild > out.log

devenv.exe /Rebuild > out.log

在我的 out.log 中,我看到以下内容:

In my out.log, I see the following:

C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets(420,5): 错误:调用的目标已抛出异常.

我已经坚持了几个小时,无法再构建这些 VSPackage.任何人?这真的很令人沮丧.我已经尝试使用 Visual Studio 本身(不是命令行)来清理项目/重建/构建

I have been stuck on this for hours and can no longer build these VSPackages. Anyone? This is really frustrating. I have already tried cleaning project/rebuilding/build using Visual Studio itself (not command line)

推荐答案

我在 vs2010 和 vs2012 中都遇到过多次这个问题,手动从项目中删除bin"和obj"文件夹然后执行重建"通常可以解决问题.

I've experienced this issue several times in both vs2010 and vs2012, and manually deleting the "bin" and "obj" folders from the project then doing a "rebuild" normally does the trick.

这篇关于“调用的目标已抛出异常."构建 Visual Studio 2010 VSPackage 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆