When using the Microsoft.Data.SqlClient package (version 2.0) in my code I get the following error when Unit Tests are executed via VSTest.console.exe in our CI provider (and when ran locally):
System.TypeInitializationException: The type initializer for 'Microsoft.Data.SqlClient.TdsParser' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Data.SqlClient.SNILoadHandle' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x86.dll': The specified module could not be found
The code executes correctly and unit tests also work fine from NCrunch and the Visual Studio 2019 test runner - so what's the issue?