SqlConnection in Portable Class Library

So I just started to work on a bigger project which includes a web application, a windows service and a UWP. I thought that with one code base one portable class library i can serve all projects.

Now my first problem is, that i can't use the SqlConnection class. I get following error:

Error CS7069 Reference to type 'Component' claims it is defined in 'System', but it could not be found

What I'm doing wrong? Or is it not possible? What would be the right way?

Thanks guys!


ANSWERS:


UWP doesn't support SqlConnection so you'll need to do your database access differently there.

Specifically, the error is saying that the type Component isn't in the System namespace. This is because in a PCL you only have access to types that are included in all the platforms your PCL targets.



 MORE:


 ? How to exit or close an UWP app programmatically? (Windows 10)
 ? Shared model to access SQL Server from UWP
 ? How to use a Database from a Windows tablet UWP app?
 ? Universal WIndows App Visual Studio Enterprise 2015
 ? Using DESCryptoServiceProvider in Universal Windows Platform (UWP) app
 ? Can't create Xamarin UWP project in visual studio 2015
 ? UWP 10 and Windows 8 or 8.1
 ? UWP 10 and Windows 8 or 8.1
 ? UWP 10 and Windows 8 or 8.1
 ? Is there an alternative to Windows 8.1 SettingsFlyout in Windows 10 UWP development?