System.TypeLoadException在未知模块与SQL Server CE [英] System.TypeLoadException in Unknown Module with SQL Server CE

查看:172
本文介绍了System.TypeLoadException在未知模块与SQL Server CE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C#的Windows Mobile应用程序最初是在VS2005被用来创建创建 测试数据库。但是,现在,我已经包括了C#code到VS2008 项目并重新设置SQL引用,我收到以下错误:

I have a C# windows mobile application originally created in VS2005 that was used to create a test database. However, now that I've included the C# code into a VS2008 project and re-setup the SQL references, I receive the following error:

类型'System.TypeLoadException'未处理的异常的发生 未知的模块。

An unhandled exception of type 'System.TypeLoadException' occurred in Unknown Module.

信息:文件或程序集名称System.Data.SqlServerCe, 版本= 3.5.0.0,文化=中性公钥= 3BE235DF1C8D2AD3',或者一个 它的依赖,没有被发现。

Additional information: File or assembly name 'System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=3BE235DF1C8D2AD3', or one of its dependencies, was not found.

该参考路径似乎是良好。任何想法?

The reference path appears to be good. Any ideas?

谢谢

推荐答案

尝试删除并重新进行添加的参考。

Try to drop and readd the Reference.

有一个快速浏览一下我自己的GAC显示,库中的一个不正确的公钥

A quick glance at my own GAC shows that library to have an incorrect PublicKeyToken

Assembly:         System.Data.SqlServerCe
Culture:          Neutral
Version:          3.5.0.0
Public Key Token: 89845dcd8080cc91

在一个快速谷歌,它看起来像您引用的设备平台版本的台式机平台版本,而不是。

After a quick google, it looks like your referencing the desktop platform version instead of the device platform version.

在这里看到这个帖子

<一个href="http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/f509138c-8442-4bef-916a-a97bda4721ee" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/f509138c-8442-4bef-916a-a97bda4721ee

在桌面上运行SQL Mobile应用程序不支持的情况下   (除非您的桌面是一个平板电脑)。

Running Sql Mobile applications on the desktop is not a supported scenario (except your desktop is a TabletPC).

有关System.Data.SqlServerCe(桌面平台),公钥令牌是3be235df1c8d2ad3

The public key token for System.Data.SqlServerCe (desktop platform) is 3be235df1c8d2ad3

有关System.Data.SqlServerCe(设备平台)的公钥标记是89845dcd8080cc91

The public key token for System.Data.SqlServerCe (device platform) is 89845dcd8080cc91

这篇关于System.TypeLoadException在未知模块与SQL Server CE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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