使用SQL CE 4.0部署应用程序以在32位和64位PC上工作 [英] Deploying application using SQL CE 4.0 to work both in 32 and 64 bit PC

查看:88
本文介绍了使用SQL CE 4.0部署应用程序以在32位和64位PC上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算创建一个使用SQL CE 4.0的应用程序。我看到好像有中央部署和私有部署两种类型。因此,现在我计划使用私有部署。因此,所有dll必须按照这里

I am planning to create an application which uses SQL CE 4.0. I saw like there are two types of deployment central and private. So now i am planning to use private deployment. So all the dll must be included in the project as explained here.

但是我尝试仅从XP PC(32位)中添加所有dll,而没有添加任何64位dll(但是提到要添加64位dll)。然后我将平台设置为x86。构建应用程序后,我尝试在64位PC上运行我的应用程序,并且该应用程序正常工作。我期望它会产生错误,因为我没有包含64位dll。

But I tried just adding all dll from my XP PC(32 bit) and not added any 64 bit dlls(but it was mentioned to add 64 bit dlls). Then i set platform to x86. After building application i tried running my application in a 64 bit PC and it worked properly. I was expecting it would give error as i have not included 64 bit dlls.

那么在64位PC上正常工作的原因是由于我设置的x86平台?还可以使用相同的方法来部署应用程序并将其提供给客户(而不是分别使用32位和64位dll)吗?

So the reason for proper working in 64 bit pc is due to x86 platform which I have set? Also can I use same method to deploy application and give it to my customers(instead of using 32 bit and 64 bit dll separately)?

编辑:

在Windows XP PC中,我仅安装.net 2.0,然后运行具有sql ce 4.0 SP1私有部署的应用程序,并且运行良好。

In a windows XP PC i installed only .net 2.0 and then run my application which has sql ce 4.0 SP1 private deployment and it worked fine.

然后我在安装sql ce 4.0 sp1之后在同一台PC上测试了集中部署(应用程序路径中没有dll),而在运行应用程序时出现了

Then i tested central deployment(no dlls in application path) in same pc after installing sql ce 4.0 sp1 , while running application I got error like

System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

然后我卸载sql ce 4.0 sp1,然后安装sql ce 4.0(不带sp1),现在进行集中部署申请工作!那么到底是什么问题呢?

Then i uninstalled sql ce 4.0 sp1 and then installed sql ce 4.0 (without sp1) and now central deployment application worked!! So what is the problem actually?

在SQL CE 4.0下载页面中,提到最低要求是.net 3.5 SP1。那么私有部署仅适用于.net 2.0吗?为什么我在使用sql ce 4.0 sp1进行集中部署时出错?

In SQL CE 4.0 download page it's mentioned like .net 3.5 SP1 is the minimum requirement. So does private deployment works only with .net 2.0?Also why i got error for central deployment with sql ce 4.0 sp1?

推荐答案

是的,强制使用x86是一种很好且简单的方法,并且在两种桌面平台上都可以正常使用

Yes, forcing x86 is a good and simple approach, and will eork well on both desktop platforms

这篇关于使用SQL CE 4.0部署应用程序以在32位和64位PC上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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