(Configuration: VS 2015 community, Windows 10 64bit, .Net 4.6.1)
At one point I installed
Npgsql Data Provider .Net Data Provider for PostgreSQL Npgsql Npgsql.NpgsqlFactory, Npgsql, Version=3.0.7.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
to be used by
DbProviderFactories.GetFactoryClasses().
I am now trying to remove it.
I have removed all connection strings and the xml element from the project's App.config.
From both
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\CONFIG\machine.config
and
%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\CONFIG\machine.config
I removed the provider declaration in DbProviderFactories
add name="Npgsql Data Provider" invariant="Npgsql" support="FF" description=".Net Framework Data Provider for Postgresql Server" type="Npgsql.NpgsqlFactory, Npgsql"
- Using gacutil /u npgsql, I removed all npgsql references from the GAC:
gacutil /l Npgsql Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0 Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
Number of items = 0
So after removing Npgsql provider from the machine.config's, the App.config, and the GAC, DbProviderFactories.GetFactoryClasses() still reports:
Npgsql Data Provider .Net Data Provider for PostgreSQL Npgsql Npgsql.NpgsqlFactory, Npgsql, Version=3.0.7.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
What else do I need to do to convince DbProviderFactories that Npgsql is not a provider??
Thanks much for any help on this.
Edit#1: I never could "remove" the Npgsql provider, but rebuiling with a target framework of NET 4.5.2 (instead ofNET 4.6.1) did solve much of the other problems.
Edit#2: I need to come back to this, but it is interesting that Visual Studio 2015 Community has its own configuration for DbProvderFactories at
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe.config