我将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