如何使用 SQL Express 安装和配置发布我的 winform 应用程序? [英] How can I publish my winform application with SQL Express installation and configuration?

查看:32
本文介绍了如何使用 SQL Express 安装和配置发布我的 winform 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次发布我的应用程序.我使用的是 Visual Studio 2015,它似乎没有安装项目.也许我的安装没有完成?发布 Winform 应用程序是否有规范?或者我是否需要为安装向导创建一个表单.此外,我的安装需要包括和配置 SQL Express,例如附加我的空 mdfs、分配 sa 登录名等.

This is my first time publishing my application. I am using Visual Studio 2015 and it doesn't appear to have a setup project. Maybe my installation was not complete? Is there a norm in publishing Winform applications? Or would I need to create a form for an installation wizard. Also, my installation needs to include and configure SQL Express like attaching my empty mdfs, assigning an sa login and such.

有什么建议吗?

推荐答案

我认为您可以使用 ClickOnce 发布.

I think you can use ClickOnce publishing.

在您的项目属性中,在发布选项卡中,单击先决条件按钮,您可以在先决条件中选择 SQL Express.这样,您只需要将数据库文件设置为复制到输出目录中,并在连接字符串中使用 AttachDbFileName.

In properties of your project, in publish tab, click prerequisites button, you can select SQL Express in prerequisites. This way, you only need to set your database files to copy in output directory, and use AttachDbFileName in connection string.

您也可以创建一个 LocalDB 引导程序并使用 LocalDB.要详细了解如何在 ClickOnce 先决条件中包含 LocalDb,您可以查看此 technet 线程.

Also you can create a LocalDB bootstrapper and use LocalDB too. To read more about how to include LocalDb in ClickOnce prerequisites you can take a look at this technet thread.

这篇关于如何使用 SQL Express 安装和配置发布我的 winform 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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