This keeps happening - Microsoft.Data.SqlClient.resources.dll is not found during .NET Core 3.1 debug session in Visual Studio 2019
Exception message: "Could not load file or assembly 'C:\Users\user1\Dev\source\repos\repo_name\project_name\bin\Debug\netcoreapp3.1\runtimes\win\lib\netcoreapp3.1\Microsoft.Data.SqlClient.resources.dll'. The system cannot find the file specified."
It is only happening with this specific package, basically when I go to create a new SqlConnection object instance. Everything is working fine, except that some random software change on the system seems to always impact this package.
I'm stumped. Any ideas how to work around this in C#? It seems like it magically fixes itself if I repair or reinstall Visual Studio and .NET Core SDKs.
You can use nuget Packages to add System.data.SqlClient:
In the solution explorer /Dependencies/Packages
Search system.Data.SqlClient and add
Other investigation that could help you:https://social.msdn.microsoft.com/Forums/en-US/ec2361a3-1931-4423-bf68-08b206ce67aa/reference-systemdatasqlclient-not-found?forum=netfxbcl