5

Hi I realise there is a very similar question here. Firstly the answer proposed was not relevant as I did not have a version in the GAC. I have also tried uninstalling .NET Framework and visual studio (2013) with no luck.

For my existing projects using a version of Entity Framework before 6.1.3 it gives me the following error when I try and run:

{"The type initializer for 'System.Data.Entity.SqlServer.SqlProviderServices' threw an exception."}    
Could not load type 'System.Data.Entity.Infrastructure.TableExistenceChecker' from assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.":"System.Data.Entity.Infrastructure.TableExistenceChecker"

However they build fine, and if I use 6.1.3 it for some reason works. I know it's unique to my machine as they work on my colleagues' machines. It does this on any project referring to EntityFramework (or EntityFramework.SqlServer). It's as if somewhere there is an older version of EntityFramework.dll, but like I say it's not in the GAC.

The other suggestions have been to uninstall and reinstall with a specific version, and this doesn't work. I can't remember the point in time where it stopped working (as it has been working in the past), although it probably has something to do with me installing VS2015 which I have recently uninstalled, to no avail.

Please let me know if anyone can help or needs more information.

Many thanks.

3
  • I got this issue as well, any findings? Commented Oct 24, 2016 at 14:36
  • Unfortunately, I re-imaged my machine in the end! It was something to do with different versions of Visual Studio. Sorry I couldn't be of more help! Commented Dec 5, 2016 at 8:23
  • I got the same issue and I resolved it modifying my csproj file of presentation layer, basically, i updated the version from 6.0.0.0 to 6.1.3.0, it worked for me but after a while, I got the same issue after building a project the csproj file was not updated even Commented Jun 8, 2017 at 9:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.