Windows窗体应用程序部署 [英] Windows Forms Application Deployment

查看:98
本文介绍了Windows窗体应用程序部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用visual studio 2010创建了一个简单的应用程序。现在我想部署应用程序。我在一个网站上读到。他们说一些指示。我跟着它。



•右键单击解决方案资源管理器中的解决方案项。选择添加|上下文菜单中的新项目....在调用的添加新项目对话框窗口中,找到其他项目类型 项目类型部分中的设置和部署节点。在模板部分中选择安装项目。输入所需的安装项目名称。



但是当我选择其他项目类型时,没有项目可以选择安装项目。现在我该如何部署该应用程序。我使用SQL Express 2008单独创建数据库。



我使用连接字符串如



公共历史()

{

InitializeComponent();

cn = new SqlConnection(@Data Source = hi-pc; Initial Catalog = For_Room;集成安全性=真);

}



它是否是应用程序的正确格式。如果我部署应用程序可以在所有系统中执行吗?

I have create a simple application using visual studio 2010. Now i want to deploy the application. I read in one website. They say some instruction. I followed that.

• Right-click the Solution item in the Solution Explorer. Choose Add | New Project... in the context menu. In the invoked Add New Project dialog window, locate the Other Project Types | Setup and Deployment node in the Project types section. Choose Setup Project in the Templates section. Enter the required Setup project name.

But When i select Other Project type, There is no items to select Setup Project. Now how can i deploy that application. I have create Database separately using SQL Express 2008.

I use the connection string like

public History()
{
InitializeComponent();
cn = new SqlConnection(@"Data Source=hi-pc;Initial Catalog=For_Room;Integrated Security=True");
}

Is it correct format to the application. If i deploy the application can i execute in all the systems?

推荐答案

我怀疑你使用的是Visual Studio 2010 Express。

很遗憾,设置& Express版本中没有部署项目。

如果您需要在VS Express中为项目创建安装程序,那么您可以使用NSIS,一个开源系统来创建Windows安装程序:

http://nsis.sourceforge.net/Main_Page [ ^ ]
I suspect that you are using Visual Studio 2010 Express.
Unfortunately, the Setup & Deployment projects are not available in the Express versions.
If you need to create an installer for your project in VS Express, then you can use NSIS, an open source system to create Windows Installers:
http://nsis.sourceforge.net/Main_Page[^]


我强烈推荐WiX:

http://en.wikipedia.org/wiki/WiX [ ^ ],

http://wixtoolset.org/ [ ^ ]。



在我过去的答案中,我回答了一些特别的问题,但要注意我支持WiX的论点:这个框架符合MSBuild标准,并且很好地集成在Visual Studio中。在这方面,它比那些并不总是可用且不被弃用的Visual Studio项目模板更合法。请参阅:

自定义安装项目 [ ^ ],

如何基于处理器架构类型(32位或64位)有条件地安装组件? [ ^ ]。



祝你好运,

-SA
I would highly recommend WiX:
http://en.wikipedia.org/wiki/WiX[^],
http://wixtoolset.org/[^].

In my past answers, I answered some particular questions, but pay attention on my argument in favor of WiX: this framework meets MSBuild standards and integrate in Visual Studio very well. In this respect, it's more legitimate than those Visual Studio project templates which are not always available and are being deprecated. Please see:
Custom setup project[^],
How to conditionally install components based on processor architecture type (32-bit or 64-bit)?[^].

Good luck,
—SA


这篇关于Windows窗体应用程序部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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