我有一个项目,我使用Visual Studio 2012或2013在Win 7机器上构建(每个项目的结果相同)。它一直以.net 3.5为目标。在上周安装了一些Windows更新之后,我现在在尝试从其部署包启动它时,在某些机器上(没有安装相同的更新,它在我的机器上运行正常)得到此错误。
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
如果我在dotpeek中打开它,我可以看到引用要求.net 4.0文件。我已经梳理了过去的SO帖子,这些帖子提到了VS错误以及对
的延迟引用System.Drawing, Version=4.0...
但是我的解决方案中的所有查找显示所有System.Drawing引用都正确地要求2.0.0.0。
我修复了构建机器上的所有.NET安装,但没有解决问题的方法。据我所知,我已正确安装了多目标包。有什么想法吗?