I am using Microsoft.Data.SqlClient in .NET 6 function app or console app
I got this exception break on this line of code using (SqlConnection connection = new SqlConnection(connectionString)), it seems it only throw this exception in debugging mode, I remembered the same code was okay in .NET Core 3.1 or early .NET 6, this behavior showed up recently and looks like it try to find the resource file for English language ... anyone know how to solve this problem?
System.IO.FileNotFoundException HResult=0x80070002 Message=Could not load file or assembly 'Microsoft.Data.SqlClient.resources, Version=5.0.0.0, Culture=en-US, PublicKeyToken=23ec7fc2d6eaa4a5'. The system cannot find the file specified.