0

I am using .Net Core 2.0.0 and in a project I am using SqlConnection class from System.Data.SqlClient to establish an SQL Server connection. Up until now there were no problem and I was using it along with Dapper. Then I needed to use structured type and long story short I ended up adding System.Data.SqlClient package from nuget to build the project. But Then when I run the project, I receive this run-time exception

Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.2.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

Which is strange to me because I have this package installed and it was working just fine before I added System.Data.SqlClient. What can cause the problem and how to fix it?

1 Answer 1

1

I have found the answer, the problem was I was using .net core 2.0.0 preview2 version. After upgrading to .net core 2.0.0 release version the problem has been solved.

Sign up to request clarification or add additional context in comments.

Comments

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.