使用 Visual Studio 2015 的 VB.NET 安装程序包

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36116168/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 19:46:09  来源:igfitidea点击:

VB.NET Installer Package using Visual Studio 2015

vb.netinstallationvisual-studio-2015installation-packagevs-community-edition

提问by MordC

I have created a VB.NET project using Visual Studio 2015 Community Edition. I can't figure out how to obtain the Installer (Setup) Package. I want to create this setup (Commune.exe) so that users can install on their computers. After installation, the program should appear in Start Menu and in Control Panel too. I would be happy to give the program a custom name (MDC Solutions) such that it will appear in the control panel as developed by MDC Solutions. Please help.

我使用Visual Studio 2015 Community Edition创建了一个 VB.NET 项目。我不知道如何获取Installer (Setup) Package。我想创建此设置 ( Commune.exe),以便用户可以在他们的计算机上安装。安装后,该程序也应出现在“开始”菜单和“控制面板”中。我很乐意为该程序提供一个自定义名称 ( MDC Solutions),这样它就会出现在由 MDC Solutions 开发的控制面板中。请帮忙。

回答by user1234433222

First of all install this.left

首先安装this.left

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

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

Once you have this installed,

一旦你安装了这个,

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.

转到解决方案资源管理器并右键单击“解决方案“您的程序名称”转到“添加”并选择右侧的“新项目”向下滚动到“其他项目类型”并展开它并单击“Visual Studio安装程序”并选择“安装项目”并命名您的安装程序。

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.

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

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.

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

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"

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

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.

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

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.

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

Good Luck!

祝你好运!