Visual Studio Packaging

Source: Internet
Author: User

1. Open the. lsn file to be packaged and open a window in Solution Explorer.
2. Choose "file"> "add"> "new project" on the menu bar"
3. Click "project type" ---> "other project type" ---> "installation and deployment", click "Install Project" in "template", and click "OK"
4. Click "application" in "File System"ProgramFolder, Right Border becomes blank, right-click the blank area, and click Add ---> click Project output. A dialog box is displayed, and click OK"
5. Right-click "add" ---> click "Images", select "Images" in the "Images" folder, and open "cmd.exe.
6. Click the "program" menu bar of the "user" in "File System", right-click the mouse on the right, click "Create a new program", select the .exe file in the application folder, and click "OK.
7. Click "User desktop" in "File System", as shown in the previous step.
8. Click "generate setup1 (package name)" in "generate" in the menu bar and wait until "Generate successful" is displayed in the lower left corner of the page.

When deploying a project, vs does not add shortcuts to the application on the desktop or in the Start menu. You need to manually add shortcuts.
Steps:
1. add a project (right-click solution and choose add> new project from the shortcut menu ", select "other project types", "installation and deployment", and "Installation Project", and click OK;
2. right-click the installation and deployment project you just created, select "add"> "project output", and select the project content you want to output, here I select my main project directory and select "Content File ";
The above steps have completed the installation and deployment of your project file. Next, let the user create a shortcut on the desktop after the installation is complete, click to link to the project file. (here, you can click the shortcut to open the Home Directory of the website)
3. right-click the installation and deployment project you just created and choose View> file system. The "File System on the target computer" is displayed in the left-side window ", the program structure on the client's computer after installation. Double-click the user desktop (you can also create a shortcut in the Start Program menu or other places, where I create a shortcut on the desktop), right-click in the right window, select "create new shortcut", select "application folder" in the pop-up window, select the directory file to be linked, and click OK.
OK. Generate the project. After installation, you will find the shortcut icon we created on the desktop.

ArticleSource (web development technology knowledge base): http://cn-web.com/cnweb/9/361/article/

Http://blog.csdn.net/lanmao100/archive/2008/03/03/2142397.aspx

1: Create an installation and deployment project
Open vs, click "Create Project", select "other project type"> "installation and deployment"> "Installation Wizard" (the same is true for the installation project), and click "OK" (for details, see)
The image of this topic is as follows:

2: Installation Wizard
Open the Installation Wizard, click Next, or click Finish.

3: Start production
After the installation wizard is complete, you can enter the project folder:
Double-click"Application folder"Right-click the blank area on the right and choose add> file to add the executable files and corresponding class libraries and components of your application.

Right-click your executable file, create a shortcut, and cut or copy the shortcut to "user's 'project' menu" and "User desktop" on the left.
After the installation and installation of the installer are complete, the program shortcut will be generated on "start-> All Programs" and "desktop.

Right-click "application folder" on the left to open the Properties dialog box:

Set"Defaultlocation"Remove" [manufacturer] "from the path,
Otherwise, the default installation directory of the installation program will be "C: \ programm file \ your USERNAME \ installation solution name ";

Open solution manager, right-click your solution name, and select properties:

On the open properties page, select"Required",

On the System essentials page, select the following items. This is very important !!!!! 1 !!!!!
After the installation is selected, the generated installation package contains the. netframework component. (this option is not selected by default)

Now, 99% is complete, and then click "generate-> Generate solution". Ha, generation successful!
4: Production completed
Now open the debug folder in the solution folder and you will see the generated Installation File.

[Continued] about adding the "Uninstall" Function
The above article only introduces a simple method for generating and installing,
However, vs. net2005 does not directly generate the uninstall program function,
So we have to use MSI to implement it,
I will not talk about the principle. I will search for a bunch of images online. I will only talk about operations,
[1]: when setting the purpose of your application, add an msiexec.exe multiple times,
This file is in the c: \ windows \ system32 folder,

After the program is added, change its name to "uninstall.exe" to make it more like an uninstallation program ",

Of course, this does not matter much. It can be changed without modification.
Then create a shortcut for him and put it on the desktop or "start-program,
I chose to put it in the Start menu, and what we want to do below is to find the productcode of the deployment project,
Click the project name with the left mouse button, remember to click the project name with the left mouse button, and then click the attribute tag. Note: it is not a right-click attribute,
This is very different. Now you can see the productcode,

Then open the shortcut Property dialog box that you created,
Enter "/X {productcode}" in the aguements attribute }",

Click "generate solution" to generate the installer with the uninstall function.

Related Article

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.