VS2010 ItemTemplate 抛出异常,直到打开项目属性
好的,所以我为 VS2010 编写了一些在 VB.NET (4.0) 中实现 IWizard 的自定义 ItemTemplate。足够直接了。
它们在我的测试期间工作,但当其他人部署并尝试使用其中任何一个时,Visual Studio 会抛出一个令人难以置信的通用 Exception has returned by a target of incalling
错误。
更奇怪的是,在他们打开项目属性并重试之后......他们工作了。无需改变任何东西。
有人知道发生了什么事吗?或者甚至只是让 VS 给我一个更具体的错误的一种方法?我已经尝试过 devenv.exe /log 了,但没有发现任何异常情况。
Okay, so I wrote a few custom ItemTemplates for VS2010 that implement IWizard in VB.NET (4.0). Straight forward enough.
They work during my testing, but when someone else deploys and attempts to use any of them, Visual Studio throws an incredibly generic Exception has been thrown by a target of invocation
error.
Stranger still, after they open up the project properties and try again... they work. Without changing anything.
Anyone have any clue what is going on? Or perhaps even just a way of getting VS to give me a more specific error? I already tried devenv.exe /log
but nothing out of the ordinary was there.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一番尝试和错误后,我发现问题是正在使用的外部程序集由于某种原因未加载。我使用 fuslogvw 来仔细观察,发现 Visual Studio 不是不从我在引用设置中设置的位置加载 DLL。相反,它仅在默认位置(例如 PrivateAssemblies)中查找。查看项目属性后问题仍然消失,这对我来说没有任何意义,但至少现在我知道了问题所在。
我现在的解决方案是将我的 DLL 部署到 PrivateAssemblies 中,问题就消失了。
After some trial and error, I discovered the problem was that an external assembly being used wasn't loading for some reason. I used fuslogvw in order to observe closer and found out that Visual Studio isn't loading the DLL from the location I set in the References settings. Instead, it is only looking in the default locations (such as PrivateAssemblies). The problem still goes away after viewing the project properties, which doesn't make any sense to me, but at least now I know the problem.
My solution for now is to just deploy my DLL into PrivateAssemblies and the problem goes away.