Description: Write your own C # source code after packaging generation EXE, directly installed on someone else's computer to run, as we download other people's software on the Internet, very tall, VS2015 provides packaging and generation EXE function;
Step one, open vs2015 (the other version should also be the same), open the menu file-new-project, 1.1, open interface such as 1.2
Figure 1.1
Figure 1.2
If the figure 1.2 does not have InstallShield plug-in, please go to the official website to download, download the need to register to obtain the activation code, if the registration of the country, region and other drop-down box without information, please modify the page HTML source code, manually enter the country and other information, can register success;
Step two: Open the interface such as 2.1, follow the interface prompts the steps, step by step to set up (the setup process is not ordered)
Figure 2.1
Step Three: Set Application information (application basic information), 3.1
Figure 3.1
Figure 3.2
In Figure 3.2:
1: Company name, can be filled according to the actual situation, the following 4 company address will be automatically linked up
2: The name of the application, according to the function of the program to a reasonable name
3: Application version, if you want to upgrade the update after the application, plan the version number, if subsequent maintenance and upgrade, you can not modify the default value
4: Company website
5: Set basic information, click after like 3.3
Figure 3.3
There are three items to note in Figure 3.3:
1: Installation language, that is, when the application installation interface is Chinese or English, generally selected Simplified Chinese, if you want to show a English, can not be modified, the default is English
2: Installation location, if you want to change the location of installation, press the new folder, to install in their own defined location, rather than the location given on the computer, if you do not create a new folder, install the application will only be installed in a fixed location;
3: Administrator rights, select Yes, execute the application as an administrator, otherwise the installed program will be unable to read the file
Step four: Set installation requirements (Installation Requirements), 4.1
Figure 4.1
In Figure 4.1:
1: (Install the application's operating system) if there is no special requirement, the default;
2: (application requires computer to install what software) if the installed application needs to install other software on the computer, then choose Yes, when installing the application, the interface will give the installation prompt, but generally choose No, and then in the packaging environment, the need to install things in the environment, So users do not have to download and install other software themselves;
Step five: Add application files, 5.1
Figure 5.1
In the installation location of Figure 3.2 Set 2, create a new folder, that is, when the application is installed in the future, the folder where the application files are placed, that is, in the 1 folder in Figure 5.1, create a new folder 2, under folder 2 paste the packaging files that need to be published
Add a Portal file: Remember to add, otherwise the error indicates that some. dll is missing.
Step Six: Create a shortcut to the application, 6.1
Figure 6.1
In Figure 6.1:
1: Three checkboxes are familiar to us, create shortcut in Start menu, create shortcut on desktop, use icon of shortcut
2: The icon corresponding to the third check box, you can download icon icon on the Internet, note that you cannot use other formats png,gif, etc., and you cannot change these formats directly to the icon format
Step seven, installation options, Figure 7.1
Figure 7.1
The radio boxes in Figure 7.1 are:
Whether there is a consent agreement interface, we often see the direct click on the agreed interface, generally choose Yes
Whether the user can enter information such as the interface of the company, generally choose No
Whether you can modify the installation location, the general choice is yes, and figure 3.3 in the 2 to use, this is just to show whether to change the installation location interface, the actual change in the installation location of the function is in Figure 3.3 of the 2 set
Step eight: The above completed program packaging, the following process environment packaging, implementation of one-click Installation, the program to run the required environment or platform, etc. package up
Select the environment you want to package, if there is no plug-in or platform selected on the computer you are packaging, you will be prompted to install, and then packaging, after all, nothing on your computer, how to package it
Step Nine: Release the program, according to 9.1, modify the above settings to build the solution, modify the settings to Singleimage, will all the installation files generated an EXE, no other additional things
Figure 9.1
Step Ten: The final step of setup is important
1: Required level of execution, check administrator, or install the software when the error prompts to run as an administrator
2: Check extract from Setup.exe, will pack the running environment and the installation files together, realize the real sense of one-click installation
Step 11: Generate EXE, according to, generate EXE file, if no error, will find in the project directory EXE file
Description: Note The directory, to the directory to find the Setup.exe file, that is, the installation files, double-click to install
Add:
1. Modify the name of the desktop shortcut icon: Directly follow, double-click to rename
Transferred from: https://www.cnblogs.com/heiao10duan/p/7388863.html
vs2015 C # Packager as Exe