VisualStudio packages project files as .exe installation packages

Foreword:

Use the extension: install Projects 

Note: Before packaging the project, make sure that the project can run normally, otherwise the packaging is meaningless.

1. Install the extension

Open vs software->extension->manage extension->search install Projects->install->restart the software

2. Make the installation package (setup file)

2.1, add setup project

Right-click the project's solution -> Add -> New Project -> Search for setup, find setup Project -> click Next

2.2, configure the setup project

Set the project name (the name of the exe to be packaged), project location -> create

After creation is a page like this:

2.3. Add project files to the setup project

Select the Application Folder folder -> click add -> click file

Note: Before adding, we need to copy the storage path of the project (right-click the project to be packaged -> open in the resource manager -> copy), which will be used later.

After copying the path, add->file

Extended knowledge: three folder descriptions

Application Folder  : The file settings included by the application.

User's Desktop  : User desktop shortcut settings.

User's Programs Menu  : Shortcut settings for the user's startup menu.

According to the previously copied path, find the project file -> add (if you know the path you stored, you can find it directly)

2.4. Set the main output of the project

Select the Application Folder folder -> click add -> click project output -> set as main output -> OK (a new main output file will appear afterward)

2.5. Setting shortcuts

Right click on the newly generated main output file -> Create Shortcut to main output from test (Active) dependency (E) -> rename it -> drag to user`s Desktop folder

Right-click the shortcut file -> Properties window -> Here you can set the icon (icon) properties

Keep clicking OK until you exit the window

2.6. Generate installation package

Right-click the setup project -> Build -> Wait for the build to succeed -> You can view the installation package under the setup project path on the computer

So far, the project has been successfully packaged and can be installed or sent to others!

Guess you like

Origin blog.csdn.net/shiwei0813/article/details/132352030