- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我已经使用 Entity Framework 开发了一个应用程序、SQL Server 2000、Visual Studio 2008 和 Enterprise Library。
它在本地工作得很好,但是当我将项目部署到我们的测试环境时,出现以下错误:
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 似乎有问题,有什么解决办法吗?
最佳答案
此错误没有真正 Elixir 的答案。关键是要有所有的信息来理解问题。很可能动态加载的程序集缺少引用的程序集。该程序集需要位于应用程序的 bin 目录中。
使用此代码确定缺少的内容。
using System.IO;
using System.Reflection;
using System.Text;
try
{
//The code that causes the error goes here.
}
catch (ReflectionTypeLoadException ex)
{
StringBuilder sb = new StringBuilder();
foreach (Exception exSub in ex.LoaderExceptions)
{
sb.AppendLine(exSub.Message);
FileNotFoundException exFileNotFound = exSub as FileNotFoundException;
if (exFileNotFound != null)
{
if(!string.IsNullOrEmpty(exFileNotFound.FusionLog))
{
sb.AppendLine("Fusion Log:");
sb.AppendLine(exFileNotFound.FusionLog);
}
}
sb.AppendLine();
}
string errorMessage = sb.ToString();
//Display or log the error based on your application.
}
关于c# - 错误消息 'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19203278/
Win32 的 Delphi XE5 编译器具有新的调试信息设置:有限调试信息。 有限调试信息和调试信息有什么区别? 最佳答案 某些编译器提供调试标志的变体,可提供不同级别的调试信息和优化。根据编译和
我有一个 highcharts 散点图,我想添加一些自定义功能。对于每次单击 highcharts 中的项目(单击过滤器、数据点和关闭按钮),我想将有关单击的项目的信息发送到我在下面包含的函数“s”。
我们在 Java 应用程序中更新了安全证书,突然我们开始收到下面提到的异常: java.lang.SecurityException: class "org.hibernate.cfg.Configu
我正在使用 HttpURLConnection 实例来连接到 URL。 然后我调用 getResponseCode 方法以确定连接状态。 我正在使用此方法轮询连接,直到返回的响应代码不是 1xx: H
我很难调试 ASP.NET MVC 代码。我最终按照本 website 中的描述进行操作.调试符号已加载并适用于所有 dll,但 System.Web.MVC。当我双击 stacktrace 窗口中的
好吧,我在很多应用程序上都发现了这个文本,那就是当我安装一些应用程序时需要android.permission.READ_LOGS 权限,它们显示一些文本,例如“读取敏感日志数据的权限...”我不明白
我有一个在浏览器中运行并从 Javascript 调用的小程序。有 2 个类:PortalLauncher 和 ParamSplitter,它们位于默认包中。 Javascript 调用 Portal
我在 eclipse 中使用 OSGi 项目运行 JUnit 测试,我遇到了这个异常: java.lang.SecurityException: class "org.eclipse.core.run
我正在开发一个给 PDF 加水印的小工具,它适用于某些 PDF,但对某些其他 PDF 会崩溃。 我正在使用 iText 库和 bouncycaSTLe(依赖项) pom.xml:
很抱歉,我不知道这是否是属于mathoverflow的数学问题,还是属于这里的计算机科学问题。 就是说,我相信我理解基本的difference between data, information, a
在什么情况下“反文档频率”在信息检索中不起作用? 最佳答案 如果您不希望在系统中权衡稀有术语而不是频繁出现的术语,则可能不希望使用IDF。此外,计算idf是一项昂贵的操作。从以下事实可以明显看出这一点
我正在尝试计算 Average Precision (和 Mean Average Precision )在 Oxford Building image dataset 上. 下面是他们提供的用于计算
信息隐藏如何帮助解耦构成系统的模块? 最佳答案 封装(信息隐藏)允许您只向外界公开绝对最小值。这意味着您可以在不影响客户的情况下将未公开的位更改为您心中的内容。 一个例子。假设您已经实现了一个将字符串
想象一下,在接下来的 10 年里,你拥有世界上所有的 super 计算机。你的任务是尽可能无损地压缩 10 部完整的电影。另一个标准是普通计算机应该能够即时解压缩,并且不需要花费太多的 HD 来安装解
我生活在一个每年更改两次时间的国家。即:一年中有一段时期与 UTC 的偏移量为 -3 小时(-180 分钟),其他时期的偏移量为 -4 小时(-240 分钟) 从图形上看: |-----
在哪里可以找到有关 DrRacket 中 #:when 构造的文档? 这是完整的示例: (define (problem_9 sum) (for*/first ([c (in-range 3 (-
有人知道在网站上查找最相关的联系信息的脚本/食谱/库吗? 一些可能的情况: 在个人网页上查找联系电话号码 在博客上查找所有者电子邮件地址 查找联系页面的网址 最佳答案 查看WSO2's Mashup
你们如何管理信息溢出?你们都用什么工具?有用的工具之一是 RSS 提要阅读器。是否有任何机构使用任何其他工具或任何其他方式来有效管理信息? 最佳答案 做一个信息势利小人。 如果该博客没有绝对震撼您的世
我最近根据 Artima Inside the JVM 2-nd Ed 阅读了有关 JVM 规范的内容。其中一章提到了 Java 运行时中的类型存储,内容如下: An instance of clas
我已阅读 Permuterm indexes stanford 网站上的页面,但是我仍然无法弄清楚我们如何从以下地址到达:*X*至 X* . 那么$在哪里? ? 我可以得到这些: For X, loo
我是一名优秀的程序员,十分优秀!