Reputation: 1043
I am trying to create Web API that will connect to the SQL server and run the stored procedure. I wanted to install the System.Data.SqlClient
in to the project so I can give the connection details. But when tried to install that through the Nuget Manager
it throws error like
Install failed. Rolling back...
Could not install package 'System.Data.SqlClient 4.3.0'.
You are trying to install this package into a project that targets.
'.NETFramework,Version=v4.5', but the package does not contain any
assembly references or content files that are compatible with that
framework. For more information, contact the package author.
How can I install them or is there any other way of giving the connectionStrings in web.config
Upvotes: 3
Views: 3142
Reputation: 4234
I could solve this problem with a little workaround for Xamarin PCL:
In your case with asp.net: Perhaps, you can try to create a .NetFramework ClassLibrary and follow the steps above.
I hope it will help you!
Upvotes: 1