Create an installation file in

Source: Internet
Author: User

The first step is to create a simple windows form application and name the project winformtest. The solution is winformsetup.

The second step is to add a button in the Form and add code to the button event. This is just a test.

namespace WinFormTest{    public partial class Form1 : Form    {        public Form1()        {            InitializeComponent();        }         private void button1_Click(object sender, EventArgs e)        {            MessageBox.Show("Hello Setup!");        }    }}

Step 3 is the focus. Add another project in another project type ==== installation and deployment === Visual Studio installer installation project, and then add the project name setuptest

Di

Step 4: You can see the following files after adding a project

Next, add three folders to the application folder.

The system folder of the test project is a common file of the project system, and the image file added by images is reserved as a backup.

Step 5 add project input in the test project system folder

Then add the primary output and click OK.

Step 6, right-click the project to generate a file.

Click setup.exe to install the winform application.

Click Next to complete the installation. However, we need to know the installation directory before opening the EXE file to open the project. So let's take a look at how to add shortcuts, now let's add a shortcut icon file in images.

Next, right-click winformtest (activity) in the main output to add a shortcut

Rename it winformtest, right-click the shortcut, and select the ICO file you just added in the ICO file.

 

You can place files on the desktop.

Then, the project is generated again to generate the installation file. Click "desktop shortcut" to open the project.

Create an installation file in

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.