2

I am unable to use the WCF Test Client. I always get the following error.

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.

I'm not having any luck finding a solution on google. I'm hoping that the stackOverflow hive brain can help.

Thanks.

Charley Rathkopf
  • 4,720
  • 7
  • 38
  • 57

1 Answers1

3

If I'm not mistaken, you need to add the runtime version setting in your app.config file's <configuration> element:

<startup>
  <requiredRuntime version="v4.0.30319" />
</startup>
Metro Smurf
  • 37,266
  • 20
  • 108
  • 140
  • Thanks. that's it. I've got version v4.0 rather than v4.0.30319. What about the sku=".NETFramework,Version=v4.0" attribute? Is it required? Does it need to be changed as well? – Charley Rathkopf Feb 18 '11 at 17:14
  • V4.0 is actually v4.0.30319. I'm not sure about the sku attribute. Was the error resolved by adding the runtime version to the app.config? – Metro Smurf Feb 18 '11 at 17:47