0

I moved my ADO.NET Entity Framework model from one class library project to another. Now I get this error when the flow-of-control reaches the constructor of my class that derives from ObjectContext.

Unable to load the specified metadata resource.

   at System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources(String assemblyName, String resourceName, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver)
   at System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource..ctor(String originalPath, String assemblyName, String resourceName, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver)
   at System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver)
   at System.Data.Metadata.Edm.MetadataCache.SplitPaths(String paths)
   at System.Data.Common.Utils.Memoizer`2.Result.GetValue()
   at System.Data.Common.Utils.Memoizer`2.Evaluate(TArg arg)
   at System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections)
   at System.Data.Objects.ObjectContext..ctor(EntityConnection connection, Boolean isConnectionConstructor)
   at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
   at Resources.BaseServices.Globalization.Models.ResourceGlobalizationEntities..ctor() in C:\Solution\Model\ResourceGlobalizationEntities.cs:line 7
   at Resources.BaseServices.Globalization.Models.Culture.IsValidCulture(String shortName) in C:\Solution\Model\Culture.cs:line 24
   at Resources.BaseServices.Globalization.EntityFrameworkStringResourceLoader.set_CultureName(String value) in C:\Solution\BusinessObjects\EntityFrameworkStringResourceLoader.cs:line 129
   at Resources.BaseServices.Globalization.EntityFrameworkStringResourceLoader..ctor(String cultureName, IDataSource dataSource) in C:\Solution\BusinessObjects\EntityFrameworkStringResourceLoader.cs:line 19
Water Cooler v2
  • 32,724
  • 54
  • 166
  • 336
  • 1
    Is this related? http://stackoverflow.com/questions/1074337/metadataexception-when-using-entity-framework-entity-connection – syclee Jul 10 '13 at 07:12
  • Indeed it was. I had had this error for the 3rd time in 2 years and had everytime resolved it using the same technique. Once, I believe I did not explicitly provide the assembly name but the asterisk (*) worked, as it should, for all assemblies referenced. But I can't remember the specifics of that situation. Thanks much. – Water Cooler v2 Jul 21 '13 at 06:01

0 Answers0