如何使使用 SQL Express 在 WinForms .NET 3.5 中开发的软件变得可移植

发布于 2024-09-28 20:48:01 字数 216 浏览 0 评论 0原文

我发现为 windows xp/vista/7 创建安装和部署包真的很痛苦 所以我的问题是我可以使我的应用程序与任何第三方工具(例如瘦应用程序)兼容吗?

我的应用程序需要安装 dot net 3.5 框架和 sql express 05 我想将其放在 USB 驱动器上,用户可以直接从 USB 驱动器执行它,无需任何设置和部署,如果还有其他方法来实现软件的可移植性,请告诉我?

谢谢 !

i found that its really pain to create setup and deployment packages for windows xp/vista/7
so my question is can i make my application portable with any third party tool such as thin app ?

my application requires dot net 3.5 framework and sql express 05 installed i want to put it on usb drive and user can execute it directly from usb drive without any setup and deployment, if there any other ways to achieve portability for software please let me know?

thanks !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

护你周全 2024-10-05 20:48:02

为了检查是否安装了.Net 3.5和sqlexpress,您可以检查它们是否在注册表中注册。

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion - CurrentVersion

但是您无法使用 3.5 编译的程序集来检查这一点,因此您需要一个非 dotnet 应用程序来执行此操作,例如安装程序。

您必须使用 C++ 之类的语言创建启动器,或者可以创建一个 vb 脚本启动器,在启动 .net 应用程序之前检查先决条件。

In order to check if .Net 3.5 and sql express is installed you can check if they are registred in the registry.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion - CurrentVersion

But you cannot check this with your 3.5 compiled assembly, so you need a non-dotnet application to do it, like a setup program.

Either you have to create a launcher in something like c++, or you could create a vb script launcher which checks the prerequisites before launching your .net app.

久光 2024-10-05 20:48:02

如果没有安装在本地硬盘上,SQL Express 和 .NET Framework 都无法运行。

SQL Express 来源:http: //social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/fc729d31-8a0b-4156-ab75-4fec652a438b

Neither SQL Express nor the .NET Framework will not run without being installed on the local hard disk.

Source for SQL Express: http://social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/fc729d31-8a0b-4156-ab75-4fec652a438b.

枫林﹌晚霞¤ 2024-10-05 20:48:02

@Mikael 已经告诉了 .NET 检测的技巧,您应该看看。

我只想补充一点,对于便携式应用程序,您应该使用 SQL Server Compact 版本而不是 Express,

链接

@Mikael already told the trick for .NET detection which you should take a look at.

I just want to add that for portable applications, you should use SQL Server Compact edition instead of Express,

Link

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文