我的项目以 .Net 4.0 客户端配置文件为目标,但它一启动就崩溃,显示文件加载异常,指出 System.Core version= 2.0.5.0 。我该如何改变它?
编辑:忘记添加了,这是一个WPF项目。
最佳答案
这主要是为了 future 的我,我会在某个时候回到这个问题,目前的答案都不能解决你的问题(嘿, future 的我!)
我的问题是一个引用 System.Core 2.0.5.0 的 nuget 包,所以我无法控制引用。
为了在已经安装并修补了 .NET 4.0 的机器上安装 System.Core 2.0.5.0,我安装了 Portable Class Library。 .
To install the Portable Class Library tools on a build machine without installing Visual Studio 2012, download the Portable Library Tools, and save the download file (PortableLibraryTools.exe) on your computer. Run the installation program from a Command Prompt window, and include the /buildmachine switch on the command line.
关于c# - 将我在 Visual 2010 中的项目定位到 .Net 4.0,但系统仍在寻找 dll 'System.Core version 2.0.5.0',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9219852/