System.Reflection.ReflectionTypeLoadException与实体框架4 [英] System.Reflection.ReflectionTypeLoadException with Entity Framework 4

查看:293
本文介绍了System.Reflection.ReflectionTypeLoadException与实体框架4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Windows窗体应用程序EF4。我每当我在计算机上运行一个版本的文件一个问题,Visual Studio 2010的安装,我总是得到这个错误没有:

I am using EF4 in windows form app. I got a problem whenever I run a release file in machine which doesn't have visual studio 2010 installed I always got this error :

系统.Reflection.ReflectionTypeLoadException:无法加载请求的类型中的一种或
以上。获取更多信息。

System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information

到目前为止,唯一的解决办法是安装VS 2010和重建,以解决使释放运行。它是如此讨厌,我不知道是否有更好的解决方案。

So far, the only workaround is install VS 2010 and rebuild solution in order to make the release run. It's so annoying, I wonder if there is a better solution.

推荐答案

假设你安装在客户机上正确的客户端配置文件你可能有依赖关系不在基本安装,需要包括在部署到客户端的一部分的框架。

assuming you have the correct client profile installed on the client machine you might have dependencies to frameworks that are not in the base installation and need to be included as part of your deployment to the client.

您可以快速选择验证所有引用的DLL和设置复制本地=真

You can quickly verify by selecting all the referenced dlls and setting Copy Local=True

和测试在客户机上的bin一切。

And testing everything in the bin on a client machine.

这篇关于System.Reflection.ReflectionTypeLoadException与实体框架4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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