如何发布/部署Visual Studio项目作为安装程序 [英] How to publish/deploy visual studio project as an installer

查看:174
本文介绍了如何发布/部署Visual Studio项目作为安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚完成了为公司开发系统的工作.它将在50台以上的PC上使用.

I just finished developing a system for a company. It will be used on 50+ PCs.

剩下的唯一问题是安装过程.我认为手动复制项目的整个文件夹效率不高,例如在Documents文件夹中,并在每台PC上创建.exe文件的桌面快捷方式.

The only problem left is the installation process. I don't think it's efficient to manually copy the whole folder of the project e.g. on Documents folder and create a Desktop shortcut of the .exe file on every PC.

如果可能的话,我想将(不确定这是否合适)整个项目文件夹压缩到单个安装程序/安装程序中,然后将其放置在Documents文件夹中,创建.exe文件的桌面快捷方式.有没有办法做到这一点?谢谢.

If possible, I'd like to compress (not sure if this is the right term for it) the whole project folder into a single setup/installer which will place it in the Documents folder and create a Desktop shortcut of the .exe file. Is there a way to do that? Thanks.

推荐答案

首先安装this.left

First of all install this.left

https://visualstudiogallery.msdn.microsoft.com/f1cc3f3e- c300-40a7-8797-c509fb8933b9

安装完成后,

转到解决方案资源管理器,然后右键单击解决方案",然后将您的程序名称"下移至添加",然后在右侧选择新建项目",向下滚动到其他项目类型",然后展开并单击可视化" Studio安装程序",然后选择安装项目"并命名您的安装exe.

go to Solution Explorer and right click "Solution "YOUR PROGRAMS NAME" go down to "Add" and select "New Project" on the right hand side scroll down to "Other Project Type" and expend it and click on "Visual Studio Installer" and select "Setup Project" and Name your setup exe.

将弹出一个新窗口.在左侧,您将看到应用程序文件夹",右键单击它,然后选择添加">项目输出",然后单击主要输出",然后按确定"

A new window will pop up. On the left hand side you will see "Application Folder" Right click on it and select "Add" > "Project output" and click on "Primary Output" and press "ok"

完成此操作后,在右侧应看到两个或更多文件,右键单击应显示来自您的程序名称"的主要输出"的文件,然后选择创建快捷方式-您的程序名称"

Once you have done that, on the right hand side you should see two or more files, right click on the one that should say "Primary output From "YOUR PROGRAMS NAME" and select "create Shortcut - "YOUR PROGRAMS NAME"

完成后,将快捷方式重命名为程序名称.例如,单击我的第一个程序"并将其拖到左侧的用户桌面文件夹".

Once that is done, rename your shortcut to your programs name. eg "my first program" after that click and drag it to "Users Desktop Folder on the left hand side.

然后右键单击用户程序菜单",然后添加一个文件夹并将其命名为您的程序公司名称例如Microsoft",这将在开始菜单中创建一个文件夹.

Then right click "User's Program Menu" and add a Folder and name it to your programs company name "eg Microsoft" this will make a folder in the start menu.

在选择您刚刚重命名的文件夹后,右键单击右侧并选择创建新快捷方式",将为您弹出一个窗口,选择应用程序文件夹",然后选择您的程序名称的主要输出" ",然后按确定"

After that select the folder you have just renamed and right click on the right hand side and select "Create new Shortcut" a window will pop up for you, select the "Application Folder" and then "Primary output from YOUR PROGRAMS NAME" and press "ok"

完成所有这些操作后,转到解决方案资源管理器"并按F4,您将可以在此处选择添加有关程序的详细信息,例如程序的名称,甚至是图标.

Once all of this is done close out of it and go to "Solution Explorer" and press F4, here you will have the options to add details about your program eg who it is and even an icon.

我可能错过了一些东西,但是阅读此书后,您将对所需内容有基本了解,并且可以添加自己的东西.

I may have missed somethings, but after reading this you will have a basic idea of what is required and you will be able to add your own things.

我也不记得了,但是您可能还必须将程序图标添加到应用程序文件夹"中

Also i cant remember but you might have to also add your programs Icon to the "Application Folder"

完成所有操作后,打开解决方案资源管理器",然后右键单击创建的新项目,然后按构建",您将可以找到主项目所在的文件.

once you have done everything, open "solution explorer" and right click on the new project you have created and press "build" you will be able to find the files where you main project is located.

祝你好运!

这篇关于如何发布/部署Visual Studio项目作为安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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