I'm using ArcGIS Pro SDK version 3.0 in Visual Studio 2022. I've loaded the System.Data.Client Package version 4.8.3 from NuGet Package Manager into my ArcGIS Pro Module Add-in project. The issue I'm having is that I'm getting an error: 'System.Data.SqlClient is not supported on this platform' when I try to use a System.Data.SqlClient.SqlConnection object.
static string sConn = "workstation id=GIS6;packet size=4096;user id=xyz;password=xyz;data source=xyz;persist security info=False;initial catalog=xyz";
SqlConnection Conn = new SqlConnection(sConn);
This code works without error if I run it in a Visual Studio 2022 Windows Forms project with the same identical System.Data.Client Package version 4.8.3 loaded. Any ideas of how I might fix this error?
There's a similar issue described here: https://community.esri.com/t5/arcgis-pro-sdk-questions/add-in-fails-with-quot-the-specified-module-could/td-p/1081140 but in this issue ArcGIS Pro 2.8 sdk and Visual Studio 2022 is used.
The connection string code was working fine for me at ArcGIS Pro sdk 2.9 Visual Studio 2017
Thanks
Pete