• I was working to get EntitySpaces to work with PostgreSql. While I had all dlls in correct places but still keep getting exception - "Unable to Find EntitySpaces.Npgsql2Provider.dll".

    First I thought it require dlls in GAC - didn't helped.
    May be Npgsql.dll version - downloaded exact version from Postgres site - didn't helped.
    Looked at EntitySpaces documentations - didn't helped.
    Googled for help - didn't helped.
    Looked at EntitySpaces forums - didn't helped.
    Looked at EntitySpaces Blogs - didn't helped.

    To my surprise there is not even much of documentation from EntitySpaces team for PostgreSql provider. Not even how provider should be configured. Just one liner in Assembly list documentation.

    Anyway, since we are using EntitySpaces from their v1, I remember one change they made few years ago - LoaderMT. This is provider loader for Medium Trust environment. Before that EntitySpaces always needed Full trust since they were doing reflections to load providers.

    Only note from EntitySpaces triggered this memory was in EntitySpaces studio. When you select PostgreSQL for connection there is note added bellow connection string textbox - "The EntitySpaces Metadata Engine uses reflection to load Npgsql, you can either install a copy in the GAC or in the 'C:\Program Files (x86)\EntitySpaces 2012\CodeGeneration\Bin' folder. You must have a version in the GAC to use the Visual Studio Plugin, otherwise you will have to run the StandAlone application located on your Start -> Programs menu. You can save your settings as the default by clicking the 'Save Default Settings' icon on the toolbar."

    "Reflection"! This means that if you are using LoaderMT provider (like me) in your application you will not be able to use EntitySpaces.Npgsql2Provider.dll and keep getting "Unable to Find EntitySpaces.Npgsql2Provider.dll".

    Solution - very easy just use EntitySpaces.Loader.dll instead of EntitySpaces.LoaderMT.dll. Only catch - you are no longer capable of running your app in Medium trust environment.

    Hope this help.
0 Years in
Operation
0 Loyal
Clients
0 Successful
Projects

Words from our clients

 

Tell Us About Your Project

We’ve done lot’s of work, Let’s Check some from here