如何部署Windows .net应用程序?

问题描述:


我在C#中的Visual Studio 2005中开发了一个基于Windows的应用程序.我已经使用Microsoft Enterprise Library进行数据库操作和Crystal Reports.To要将其部署在differentebt机器上,我尝试了两种方法,但均失败了.

1.我已经构建了这个应用程序,并从安装程序上的DEBUG filder复制了所有文件(仅用于测试),它工作正常,但是当我打开一个Crystal报表时出现错误
发生了未经处理的异常.长度不能小于零.参数名称长度"


2.我试图通过Microsoft安装项目为此应用程序进行安装.我在项目中添加了.exe文件和app.config文件,还为Crystal Report合并了模块.从该安装程序安装此应用程序后,打开了我的第一个表单(登录),但是当我单击登录"按钮进行登录时,我得到了对象引用未设置为对象的实例"(我认为在创建与SQL的连接时服务器dB).


因此,双方都坚决解决了这个问题.
有解决此问题的指导方针吗?
致谢


i have one windows based application developed in Visual studio 2005 in c#. i have used microsoft enterprise library for database operations and crystal reports also.To deploy it on differebt machine i tried in twop ways but faild.

1. i have build this application and copied all files from DEBUG filder on installation machine (Just for testing) and it worked fine but when i open one crystal report then i get error
"Un handeleed exception has occured... Lenght can not be less than zero. PArameter name length"


2. I tried to make setup from microsoft setup project for this application. i added there .exe file and app.config file in project and merge module for crystal report also. after instaling this applciation from thsi setup my first form (Login) is opened but when i click on "login" button to get login then i get "Object reference not set to an instance of an object" (i think while creating connection to SQL server dB).


So from both sides im stuck up with this issue.
Any guide lines to resolve this problem.?
thnx and regards

我使用了ClickOnce部署,对于真正定制的安装并没有很多选择.
我已经使用了一段时间的安装项目.它允许您使用非常好用的.msi文件部署应用程序.
如果您在代码项目中搜索这两个项目,则应该会找到一些不错的答案.

ClickOnce-部署,安装和更新基于Windows的客户端应用程序的快速步骤 [
I have used the ClickOnce deployment, there aren''t alot of options for a really customized instal.
I have been using the Setup Project for a while now. It allows you to deploy your app with an .msi file which is pretty sweet.
If you search code projects for either of these you should find a few good answers.

ClickOnce - Quick steps to Deploy, Install and Update Windows Based Client Applications[^]