错误消息“无法加载请求的类型的一个或多个。检索LoaderExceptions属性的详细信息“。 [英] Error message 'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.'
问题描述
我已经开发使用实体框架的应用程序时,SQL Server 2000,视觉 &工作室NBSP; 2008年及企业库
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:
无法加载所请求的类型的一个或多个。检索LoaderExceptions获取更多详情。
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information
堆栈跟踪:在System.Reflection.Module._GetTypesInternal(StackCrawlMark&安培; stackMark)
Stack trace: at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)
在System.Reflection.Assembly.GetTypes()
at System.Reflection.Assembly.GetTypes()
在System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadTypesFromAssembly(LoadingContext上下文)
at System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadTypesFromAssembly(LoadingContext context)
在System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.InternalLoadAssemblyFromCache(LoadingContext上下文)
at System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.InternalLoadAssemblyFromCache(LoadingContext context)
在System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadAssemblyFromCache(议会会议,布尔loadReferencedAssemblies,字典 2 knownAssemblies,字典
2及typesInLoading,List`1&安培;错误)
at System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadAssemblyFromCache(Assembly assembly, Boolean loadReferencedAssemblies, Dictionary2 knownAssemblies, Dictionary
2& typesInLoading, List`1& errors)
在System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection,装配装配,布尔loadReferencedAssemblies)
at System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies)
在System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyForType(type类型)
at System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyForType(Type type)
在System.Data.Metadata.Edm.MetadataWorkspace.LoadAssemblyForType(类型类型,大会callingAssembly)
at System.Data.Metadata.Edm.MetadataWorkspace.LoadAssemblyForType(Type type, Assembly callingAssembly)
在System.Data.Objects.ObjectContext.CreateQuery [T](字符串的queryString,ObjectParameter []参数)
at System.Data.Objects.ObjectContext.CreateQuery[T](String queryString, ObjectParameter[] parameters)
实体框架似乎有问题,任何线索如何解决它?
Entity Framework seems to have issue, any clue how to fix it?
推荐答案
我用我的项目的引用的复制本地属性设置为true解决了这个问题。
I solved this issue by setting the Copy Local attribute of my project's references to true.
这篇关于错误消息“无法加载请求的类型的一个或多个。检索LoaderExceptions属性的详细信息“。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!