将模型从一个类库移动到另一个类库时“无法加载指定的元数据资源”

时间:2013-07-10 07:10:41

标签: c# .net entity-framework entity-framework-4

我将ADO.NET Entity Framework模型从一个类库项目移动到另一个类库项目。现在,当控制流到达我的类的构造函数时,我得到了这个错误,该构造函数派生自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

0 个答案:

没有答案