I have a WinForm Application which uses the System.Data.SqlClient
package for connecting to the database.
If I start the application with Visual Studio (Debug/Release, Any CPU/x86/x64), everything works as expected, but if I create a Release with the Release Wizard (VDROJ-File) I cannot start the application anymore. I always get an exception
System/Microsoft.Data.SqlClient is not supported on this platform
I am using a .NET 6 application and tried already to change System.Data.SqlClient
to Microsoft.Data.SqlClient
and I also installed all available runtimes (Microsoft.Data.SqlClient.SNI.runtime
, runtime.native.System.Data.SqlClient.sni
, ...)
I don't know why everything is working when I start the application from Visual Studio, and why it is not working when I install the application with the wizard.
I found the problem.. The Installer Extension does not copy all neccesarry files in the folder. It misses applicationname.deps.json. If you copy this file in the install folder, everything works as expected.