I’ve been trying to get the Tracing and Caching Provider Wrappers for Entity Framework working and I ran in to a small problem. It turned out it was actually a silly RTFM issue, but in case you miss out a step here’s what happens when it is missed.
CreateWrappedMetadataWorkspace method in the
EntityConnectionWrapperUtils class a MetadataException is thrown that states:
Schema specified is not valid. Errors:
(0,0) : error 0175: The specified store provider cannot be found in the configuration, or is not valid
This happens on the line that reads:
StoreItemCollection sic = new StoreItemCollection(ssdl.Select(c => c.CreateReader()));
[Note: Your Exception Assistant may show it on a different line but the stack trace in the exception itself will report correctly.]
What I had missed was some config changes I’d somehow missed out when I was setting up the provider. The missing config is:
<system.data> <DbProviderFactories> <add name="EF Caching Data Provider" invariant="EFCachingProvider" description="Caching Provider Wrapper" type="EFCachingProvider.EFCachingProviderFactory, EFCachingProvider, Version=184.108.40.206, Culture=neutral, PublicKeyToken=def642f226e0e59b" /> <add name="EF Tracing Data Provider" invariant="EFTracingProvider" description="Tracing Provider Wrapper" type="EFTracingProvider.EFTracingProviderFactory, EFTracingProvider, Version=220.127.116.11, Culture=neutral, PublicKeyToken=def642f226e0e59b" /> <add name="EF Generic Provider Wrapper" invariant="EFProviderWrapper" description="Generic Provider Wrapper" type="EFProviderWrapperToolkit.EFProviderWrapperFactory, EFProviderWrapperToolkit, Version=18.104.22.168, Culture=neutral, PublicKeyToken=def642f226e0e59b" /> </DbProviderFactories> </system.data>
Hi i have the same problem but i have added this configuration into app.config file but probably into a wrong place. I added it into app.config for the library where i use this providers.
where exactly must i put this configuration? THX
Thanks a lot! I’ve been looking most of the day for a solution.
Thanks for this. Ran into the same problem when creating a new project and selectively copying over web.config settings.