我无法使用 WCF 测试客户端。我总是收到以下错误。
Error: Cannot load reference assembly 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'
Cannot load file C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll as an Assembly. Check the FusionLogs for more Information.
Could not load file or assembly 'file:///C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll' or one of its dependencies.
This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
我在谷歌上找不到解决方案。我希望 stackOverflow hive Brain 能够提供帮助。
谢谢。
最佳答案
如果我没记错的话,您需要在 app.config 文件的 <configuration>
中添加运行时版本设置元素:
<startup>
<requiredRuntime version="v4.0.30319" />
</startup>
关于WCF 测试客户端无法在 Windows 7 64 位上与 VS 2010 配合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4998573/