AWS-Lambda .NET Core – How to reference System.Data.SqlClient

I needed to access an RDS database (relational data store) from a C# Lambda function.? It took me a while to figure how how to reference it.

Build Error:

C# Core:System.Data.SqlClient “Data” does not exist in namespace System

Solution:

Run the following under the Nuget Package console.
Install-Package System.Data.SqlClient -Version 4.1.0

Note, it might not work with other version. I saw one blog that was 4.1 worked for them, but not higher ones. It might depend on which version of .NET Core you are using.

Uncategorized  

Leave a Reply