CData ADO.NET Provider for PostgreSQL FAQs, Community Resources, & Troubleshooting
Frequently Asked Questions
-
What versions of .NET does the CData ADO.NET Provider for PostgreSQL support?
CData ships assemblies for .NET 4.x, .NET Standard 2.0 and .NET 8.0
-
What versions of Microsoft Visual Studio are supported?
The CData ADO.NET Provider for PostgreSQL supports Visual Studio versions 2012 and above
-
What versions of Entity Framework does the CData ADO.NET Provider for PostgreSQL support?
Entity Framework 6, Entity Framework Core 8.0
-
What operating systems does the CData ADO.NET Provider for PostgreSQL support?
CData ADO.NET Providers ship with multiple assemblies:
- .NET Framework 4 assemblies run on Windows environments with x64 processors
- .NET Standard 2 and .NET 8 assemblies run on Windows, Linux, and Mac environments with both x64 and ARM64 processors
-
What is the distribution or licensing options with the CData ADO.NET Provider for PostgreSQL Community License?
The Community License allows you to install the Provider on one (1) desktop or workstation for personal use, development, or testing.
A Per-Developer license allows you to install and internally use the Provider on any number of desktops or workstations with options for royalty-free distribution within your organization.
-
What version of PostgreSQL is supported?
The CData ADO.NET Provider for PostgreSQL enables standards-based access to PostgreSQL databases version 7.4 and later.
-
What authentication schemes are supported by the CData ADO.NET Provider for PostgreSQL?
The CData ADO.NET Provider for PostgreSQL supports authentication to PostgreSQL via the following types of authentication schemes:
- Standard (Password)
- AzureAD
- AzurePassword
- AzureMSI
- AwsIAMRoles
- AwsEC2Roles
- GCPServiceAccount
Community resources
Visit the Developer Community to browse ADO.NET articles and ADO.NET questions, ask your own question, or start a conversation!Common errors and troubleshooting
-
I'm seeing the error message: password authentication failed for user 'username'
This is a common connection error thrown by PostgreSQL that can be caused by an incorrect/misspelled username or password or the user has insufficient permissions to access the PostgreSQL server. To resolve this error, ensure that the credentials provided are spelled correctly and have the necessary privileges to access your PostgreSQL server.
-
I'm seeing the error message: database 'database_name' does not exist
This will commonly occur when the specified database name in the connection string does not exist on the PostgreSQL server. Verify the database name in the connection string is correct and that the database exists on the target server in order to resolve this issue.
-
The Provider is not showing in the Server Explorer or model builder's data source dropdown
This can occur if there is an issue with installing the driver's Visual Studio extension. To remedy this, please close Visual Studio, as it must be closed for the installation to succeed. Then, please go to the lib subfolder of your installation directory and double-click the .vsix file that matches your version of Visual Studio (so if you're using Visual Studio 2022, you would click System.Data.CData.PostgreSQL.2022.vsix). Upon reopening Visual Studio, the provider should appear.
-
The assembly for an older version is being cached
Visual Studio will sometimes cache old assemblies, so for instance, if you're using v22 and upgrade to v23, when you add references to the v23 assemblies, it will change them to v22 assemblies. This can happen even after you've deleted the old version and cleaned/rebuilt the project. There are a few potential solutions for fixing this, such as right clicking the assembly, going to Properties, and looking at the Path that is listed. Creating a new project with the correct reference or deleting the old assembly listed in that path can resolve this issue, and the links below provide other potential solutions to this.
-
I'm seeing the error message: 'An item with the same key has already been added'
This error can occur when running the model builder, and it typically indicates that there is a duplicate column name. To resolve this, you will need to remove the duplicate before running the model builder again.
-
Errors when Reverse Engineering (Scaffolding) the data model:
-
I'm seeing the error message: “The term 'Scaffold-DbContext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.”
This error means you likely haven't installed the necessary Entity Framework Core tools package, "Microsoft.EntityFrameworkCore.Tools”, in your project, which is required to use the "Scaffold-DbContext" command. To resolve this, use the NuGet Package Manager to add the "Microsoft.EntityFrameworkCore.Tools” package to your project.
-
I'm seeing the error message: “Unable to find provider assembly 'CData.EntityFrameworkCore.PostgreSQL. Ensure the name is correct and it's referenced by the project.”
This error means that you likely haven't added a reference “CData.EntityFrameworkCore.PostgreSQL.dll” in your project. To resolve this, add a reference to “CData.EntityFrameworkCore.PostgreSQL.dll”, located in the lib -> net8.0 -> EFCORE80 subfolder in the installation directory.
-
I'm seeing the error message: “Could not load file or assembly 'System.Data.CData.PostgreSQL, Version=24.0.0.40, Culture=neutral, PublicKeyToken=f57f3fbecba6b076'. The system cannot find the file specified.”
This error means that you likely haven't added a reference “System.Data.CData.PostgreSQL.dll” in your project. To resolve this, add a reference to “System.Data.CData.PostgreSQL.dll”, located in the lib -> net8.0 subfolder in the installation directory.
-
I'm seeing the error message: “The type 'DbContextOptionsBuilder' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.EntityFrameworkCore, Version=8.0.0.0…”
This error means you likely haven't installed the necessary Entity Framework Core package, "Microsoft.EntityFrameworkCore”, in your project. To resolve this, use the NuGet Package Manager to add the "Microsoft.EntityFrameworkCore” package to your project.
-
I'm seeing the error message: “'KeyBuilder' does not contain a definition for 'HasName' and no accessible extension method 'HasName' accepting a first argument of type 'KeyBuilder' could be found (are you missing a using directive or an assembly reference?)”
This error means you likely haven't installed the necessary Entity Framework Core relational package, "Microsoft.EntityFrameworkCore.Relational”, in your project. To resolve this, use the NuGet Package Manager to add the "Microsoft.EntityFrameworkCore.Relational” package to your project.
-
Free Community License for data developers
The CData PostgreSQL ADO.NET Provider can seamlessly integrate your .NET applications with your PostgreSQL data. With the CData ADO.NET Provider for PostgreSQL Community License, you get free-forever libraries to access your data in personal .NET projects, all through familiar SQL. Request a license and start building PostgreSQL-connected apps today!