Project deployment

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
JeffCertain
Posts: 4
Joined: Mon 27 Jul 2015 23:17

Project deployment

Post by JeffCertain » Mon 27 Jul 2015 23:31

We have dotConnect licenses for our dev team, and are upgrading to 7.3.457.

In the past, this has been a burdensome process, and I'm hoping to make it easier.

Towards this end, I was hoping to have the DLLs included in our project bin folders rather than having to install dotConnect on every build machine, web server, and UI dev box.

I've got the DLLs included in the build just fine. I've got the following lines in the test project app.config:

Code: Select all

	<entityFramework>
		<providers>
			<provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity, Version=7.3.457.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
		</providers>
		<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
	</entityFramework>
However, when a developer who hasn't installed dotConnect tries to run our unit test suite, all he gets is an exception that reads:

Code: Select all

System.Reflection.TargetInvocationException... Unable to determine the provider name for provider factory of type 'Devart.Data.PostgreSql.PgSqlProviderFactory'.
This all works just fine on my box, but I've installed dotConnect and have it in the GAC. Any advice?

Jeff

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Project deployment

Post by Shalex » Tue 28 Jul 2015 07:08

Have you added the DbProviderFactories entry in your app.config like it is described in the documentation?
https://www.devart.com/dotconnect/postg ... yment.html
https://www.devart.com/dotconnect/postg ... rovideref6

Code: Select all

<system.data>
  <DbProviderFactories>
    <remove invariant="Devart.Data.PostgreSql" />
    <add name="dotConnect for PostgreSQL" invariant="Devart.Data.PostgreSql" description="Devart dotConnect for PostgreSQL" type="Devart.Data.PostgreSql.PgSqlProviderFactory, Devart.Data.PostgreSql, Version=7.3.457.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
  </DbProviderFactories>
</system.data>
Replace 7.3.457 here with your current version of dotConnect for PostgreSQL. Please note that the revision number of provider in the entityFramework section is *.6 but it should be *.0 in DbProviderFactories.

If this doesn't help, specify the full call stack of the error with all inner exceptions.

JeffCertain
Posts: 4
Joined: Mon 27 Jul 2015 23:17

Re: Project deployment

Post by JeffCertain » Tue 28 Jul 2015 21:21

Perfect! Thanks so much for your help; that was exactly what we needed.

Turns out that pretty much every *.config except the test project's app.config had this section.

Post Reply