2

Good day,

Why Am I getting this error with my MVC6 project? I already added System.Data.SqlClient 4.0.0-beta-23019 nuget package in my project.json. Any suggestions?

Error message:

FileNotFoundException: Could not load file or assembly 'System.Data.SqlClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

2 Answers 2

1

It is probably due to version conflicts in assemblies, Microsoft have developed a tool named Microsoft ASP.NET and Web Tools 2015 (Beta6) – Visual Studio 2015 to resolve the best suited versions for current assemblies. https://www.microsoft.com/en-us/download/details.aspx?id=48222

Better use this and start your project. But is you still wants to stick with the project your project.json should look something like this.

"dependencies": {
    "System.Collections": "4.0.10-beta-23109",
    "System.Linq": "4.0.0-beta-23109",
    "System.Threading": "4.0.10-beta-23109",
    "System.Runtime": "4.0.10-beta-23109",
    "Microsoft.CSharp": "4.0.0-beta-23109"
  },

  "frameworks": {
    "dnx451": {
      "dependencies": {
      },
      "frameworkAssemblies": {
        "System.Data": "4.0.0.0"
      }
    }
  }
Sign up to request clarification or add additional context in comments.

Comments

0

Looks like the version you were probably looking for is 4.0.0-beta-23109

1 Comment

Thanks for the reply. Yes, I am using 4.0.0-beta-23109.

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.