Reputation: 115
I have such errors:
or description who don't want to use link:
Severity Code Description Project File Line Suppression State Error CS7069 Reference to type 'Component' claims it is defined in 'System', but it could not be found Reporting_UI_UWP C:\Users\beloh\Desktop\OLSOM\AVOA\AVOAReport\VS_0.1.0\Reporting_UI_UWP\SQL\SQL.cs 33 Active Severity Code Description Project File Line Suppression State Error CS7069 Reference to type 'ICloneable' claims it is defined in 'mscorlib', but it could not be found Reporting_UI_UWP C:\Users\beloh\Desktop\OLSOM\AVOA\AVOAReport\VS_0.1.0\Reporting_UI_UWP\SQL\SQL.cs 33 Active
when write that's code:
using (SqlConnection conn = new SqlConnection(defConnString))
{
}
defConnString is defined and System.Data.SqlClient imported.
When I'm use that code:
SqlConnection conn = new SqlConnection(defConnString);
all is ok.
What's the problem?
Upvotes: 0
Views: 455
Reputation: 13850
For this scenario to work, you need the following configuration:
Here is a sample app.
Here is the session at Microsoft Ignite 2017 where we demo'ed it.
Upvotes: 1
Reputation: 2927
SqlConnection
lies in System.Data.SqlClient
namespace which is not available in UWP.
You can only use the APIs for UWP apps provided by Microsoft. Refer to Windows Runtime (WinRT) APIs.
Upvotes: 0