Skip to content

How can I remove dependencies on unused npgsql references without incurring a MetadataException in an existing EF6 implementation? #2412

Description

@SebastianVanDenDungen

Ask a question

I have an existing EF6 implementation (.NETFramework 4.8, ASP.NET) with several migrations from multiple years of product development and it used to have a dependency on postgress as we used to support using it as a database option.

Currently we no longer support this option and i would like to remove the library dependencies to reduce our total dependencies.

When i removed the supporting libraries and configuration in my Web.config i am presented with the following error

Image
System.Data.Entity.Core.MetadataException: 'Schema specified is not valid. Errors:
(0,0) : error 0175: The ADO.NET provider with invariant name 'Npgsql' is either not
registered in the machine or application config file, or could not be loaded. See the inner
exception for details."

As far as i can tell the only way i could clear this error was to re-add the libraries (npgsql and entityframework6.npgsql) and configuration which is not ideal for us, is there a correct way for me to remove these libraries or are we stuck with them now because some of our previous migrations were scaffolded with postgress support?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions