Ryan Lanciaux
Ryan Lanciaux

Reputation: 5976

Could not load System.Data

I am a little baffled as to why this is occurring. I have been cruising along just fine -- made a couple changes / rebuilt (builds just fine) and all of a sudden no matter what I do I get the following exception when I try to debug..

Could not load file or assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

Any ideas how to get this back to how it was before? I even undid the changes I made (that really shouldn't have had anything to do with this) to no avail.

Upvotes: 2

Views: 1319

Answers (2)

zanlok
zanlok

Reputation: 1630

If a "Windows" update recently patched the .NET framework version you're referencing, the compiler may think there's a versioning difference.

If this were the case, try rebooting, and possibly re-checking updates. Failing that, re-installing the .net framework version, and letting the updates get re-applied. I had a similar issue with another System component after once installing a trial version of XNA 4.0, and then uninstalling it.

Upvotes: 2

Mitchel Sellers
Mitchel Sellers

Reputation: 63126

Ensure that you have System.Data still added as a project reference. If so, be sure to then exist Visual Studio and go back in. Then do a "clean" and "Build" and you should be set to go.

Upvotes: 1

Related Questions