KySoto
KySoto

Reputation: 428

System.Data.SqlClient assembly not found .net 3.5

I am trying my hand at converting a VB.net application over to C#, and I got to the part where I was doing the database portion with the SqlClient, and it just isn’t there. most of the posts I’ve found say I should use the nuget package, but when I did that, it failed because I am targeting .net 3.5 This is a requirement because until we get rid (slowly) of all of our windows 7 machines, that’s what I have to target.

EDIT a screenshot of my reference manager, also i am using System.Data enter image description here

Upvotes: 2

Views: 955

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1062492

If you're targeting .NET 3.5, you can use a framework reference to System.Data, which gives you SqlClient. However, you probably shouldn't still keep trying to work with .NET 3.5. You won't be able to use the nuget package, because it doesn't go back that far. In csproj terms, this is:

<ItemGroup>
  <Reference Include="System.Data" />
</ItemGroup>

Upvotes: 6

Related Questions