错误消息“无法加载一种或多种请求的类型.检索 LoaderExceptions 属性以获取更多信息. [英] Error message 'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.'

查看:21
本文介绍了错误消息“无法加载一种或多种请求的类型.检索 LoaderExceptions 属性以获取更多信息.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Entity Framework、SQL Server 2000、Visual Studio 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 context)

at System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadTypesFromAssembly(LoadingContext context)

在 System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.InternalLoadAssemblyFromCache(LoadingContext context)

at System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.InternalLoadAssemblyFromCache(LoadingContext context)

at System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadAssemblyFromCache(Assembly assembly, Boolean loadReferencedAssemblies, Dictionary2 knownAssemblies, Dictionary2& typesInLoading, List`1& errors)

at System.Data.Metadata.Edm.ObjectItemCollection.AssemblyCacheEntry.LoadAssemblyFromCache(Assembly assembly, Boolean loadReferencedAssemblies, Dictionary2 knownAssemblies, Dictionary2& typesInLoading, List`1& errors)

在 System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies)

at System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies)

在 System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyForType(Type type)

at System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyForType(Type type)

在 System.Data.Metadata.Edm.MetadataWorkspace.LoadAssemblyForType(类型类型,程序集调用Assembly)

at System.Data.Metadata.Edm.MetadataWorkspace.LoadAssemblyForType(Type type, Assembly callingAssembly)

在 System.Data.Objects.ObjectContext.CreateQuery[T](String queryString, ObjectParameter[] 参数)

at System.Data.Objects.ObjectContext.CreateQuery[T](String queryString, ObjectParameter[] parameters)

Entity Framework 似乎有问题,知道如何修复它吗?

Entity Framework seems to have issue, any clue how to fix it?

推荐答案

我通过将项目引用的 Copy Local 属性设置为 true 解决了这个问题.

I solved this issue by setting the Copy Local attribute of my project's references to true.

这篇关于错误消息“无法加载一种或多种请求的类型.检索 LoaderExceptions 属性以获取更多信息.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆