I've installed .NET Core RC2 on a Debian 8 amd64 system and would like to test if it's possible to query an instance of Microsoft SQL Server.
So I'd like to add to my project a dependency on the System.Data.SqlClient
assembly.
Presently my project file created by running the dotnet new
CLI tool looks like this:
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-3002702"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
Using this answer to a similar query, I was able to add a reference to System.Data.Common
changing the
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
fragment to
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50",
"dependencies": {
"System.Data.Common": "*"
}
}
}
which made dotnet restore
use NuGet to download a bunch of stuff.
I then tried to change that fragment to read
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50",
"dependencies": {
"System.Data.SqlClient": "*"
}
}
}
but NuGet says it's
Unable to resolve 'System.Data.SqlClient' for '.NETCoreApp,Version=v1.0'.
If I change the version string to read "4.1.0-rc3-*" the error message just gets more specific:
Unable to resolve 'System.Data.SqlClient (>= 4.1.0-rc3)' for '.NETCoreApp,Version=v1.0'.
What I'm puzzled about is that the NuGet package gallery dedicated to .NET Core explicitly lists System.Data.SqlClient
as available.
So what could I do to add a reference to System.Data.SqlClient
assembly to my project and have NuGet download it?
On a side note, I'm currently playing around in a plain console with only the dotnet
CLI tool. Is there any way to manage project dependencies for a .NET Core project without resorting to installing IDEs?
"4.1.0-*"
. That will (as of now) for some reason get4.1.0-rc2-24027
which works. – PavlovSystem.Data.SqlClient
log into an instance of Microsoft SQL Server 2005 and filed an issue about this problem. – Daberath