错误消息“无法加载一个或多个请求的类型。检索LoaderExceptions属性以获取更多信息。 [英] Error message 'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.'
问题描述
我已经使用实体框架,SQL Server 2000,Visual Studio& ; 2008和企业库。
本地工作非常好,但是当我将项目部署到我们的测试环境中时,我收到以下错误:
无法加载一个或多个请求的类型。获取更多信息的LoaderExceptions属性
堆栈跟踪:在System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)
System.Reflection.Assembly.GetTypes()
在System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadTypesFromAssembly(LoadingContext context)
在System.Data.Metadata的System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.InternalLoadAssemblyFromCache(LoadingContext context)
.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadAssemblyFromCache(Assembly assembly,Boolean loadReferencedAssemblies,Dictionary
$ b $在System.Data的System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection,Assembly assembly,Boolean loadReferencedAssemblies)中的2 knownAssemblies,Dictionary
2& typesInLoading,List`1& errors)
$ b
.Metadata.Edm.ObjectItemCollection.LoadAssemblyForType(Type type)
在System.Data.Metadata.Edm.MetadataWorkspace.LoadAssemblyForType(Type type,Assembly callsAssembly)
在System.Data.Objects.ObjectContext.CreateQuery [T](String queryString,ObjectParameter []参数)
实体框架似乎有问题,任何线索如何解决?
我解决了这个问题将我的项目引用的Copy Local属性设置为true。
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 information
Stack 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?
I solved this issue by setting the Copy Local attribute of my project's references to true.
这篇关于错误消息“无法加载一个或多个请求的类型。检索LoaderExceptions属性以获取更多信息。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!