c# – 错误消息“无法加载一种或多种请求的类型。 检索LoaderExceptions属性以获取更多信息。
问题:
我已经使用Entity Framework ,SQL Server 2000,Visual Studio 2008和Enterprise Library开发了一个应用程序。
它在本地绝对可以正常工作,但是当我将项目部署到测试环境时,出现以下错误:
无法加载一种或多种请求的类型。 检索LoaderExceptions属性以获取更多信息
堆栈跟踪:位于System.Reflection.Module._GetTypesInternal(StackCrawlMark&stackMark)
在System.Reflection.Assembly.GetTypes()
在System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadTypesFromAssembly(LoadingContext上下文)
在System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.InternalLoadAssemblyFromCache(LoadingContext上下文)处
在System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadAssemblyFromCache(组装程序集,布尔值loadReferencedAssemblies,字典
2 knownAssemblies, Dictionary
2&typesInLoading,列表1&错误)在System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection,程序集程序集,布尔loadReferencedAssemblies)
在System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyForType(类型类型)
在System.Data.Metadata.Edm.MetadataWorkspace.LoadAssemblyForType(类型类型,程序集callingAssembly)
在System.Data.Objects.ObjectContext.CreateQuery [T](字符串queryString,ObjectParameter []参数)处
实体框架似乎有问题,有什么线索如何解决?
I have developed an application using Entity Framework , SQL Server 2000, Visual Studio 2008 and Enterprise Library.It works absolutely fine locally, but when I deploy the project to our test environment, I am getting the following error:Unable to load one or more of the requested types.Retrieve the LoaderExceptions property for more informationStack trace: at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)at System.Reflection.Assembly.GetTypes()at System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadTypesFromAssembly(LoadingContext context)at System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.InternalLoadAssemblyFromCache(LoadingContext context)at System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadAssemblyFromCache(Assembly assembly, Boolean loadReferencedAssemblies, Dictionary 2 knownAssemblies, Dictionary
2& typesInLoading, List`1& errors)at System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies)at System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyForType(Type type)at System.Data.Metadata.Edm.MetadataWorkspace.LoadAssemblyForType(Type type, Assembly callingAssembly)at System.Data.Objects.ObjectContext.CreateQuery[T](String queryString, ObjectParameter[] parameters)Entity Framework seems to have issue, any clue how to fix it?