1

I am trying to use some third party dlls (Entity Framework and EntityFramework.SqlServer) in my arcgis Pro sdk module. However, whenever my code runs inside ArcMap pro, I get errors like this:

No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlServerCe.4.0'. Make sure the provider is registered in the 'entityFramework' section of the application config file.

I have several stand alone apps with exactly the same app.config file "entityFramework" section which all work fine:

<entityFramework>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
      <provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
    </providers>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="System.Data.SqlServerCe.4.0" />
      </parameters>
    </defaultConnectionFactory>
</entityFramework>

During debug, I can see that the modules have loaded. In my program output I get messages like this:

C:\Users<username>\AppData\Local\ESRI\ArcGISPro\AssemblyCache{05b82a89-759c-4123-b178-75b72b968646}\EntityFramework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'ArcGISPro.exe' (CLR v4.0.30319: ArcGISPro.exe): Loaded 'C:\Users<username>\AppData\Local\ESRI\ArcGISPro\AssemblyCache{05b82a89-759c-4123-b178-75b72b968646}\EntityFramework.SqlServer.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'ArcGISPro.exe' (CLR v4.0.30319: ArcGISPro.exe): Loaded 'Anonymously Hosted DynamicMethods Assembly'.

Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Data.SqlServerCe\4.0.0.0__89845dcd8080cc91\System.Data.SqlServerCe.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

I wonder if anyone else has had a similar problem, if there is some reference or app.config setting I am missing. Or if ArcGIS pro sdk for .Net doesn't read the app.config?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.