[C#] VS2017 winform packaging and packaging problems



I recently packaged a client software and encountered some problems, so I wrote it down for your reference. I am mainly worried that I will forget it again~~ Haha

First create a new project under the project you want to package,


Create the setup project, then click Properties to modify the name of the packaged software, ProductName. . . . optional



At this point, the setup project has been created, then start to copy the contents of the debug file to be packaged into the Application Folder.

Click Application Folder -> Add -> File , select all the content to be added by Ctrl+A, and then load it. (Note: If it is a folder, it needs to be in Application Folder -> Add-> Folder, and the path and content of the folder should be completely consistent with the debug)







At this point, the contents of all the debug files that you want to package have been imported.

Then click Application Folder ->Add ->Project Output,


    

After clicking ok, the following will appear, then click this Output-> Create a shortcut, you can rename the shortcut yourself.


Then drag the modified shortcut to User's Desktop Menu. It is convenient to see the shortcut of this packager on the menu bar and on the desktop.



The following is the task of preparing to uninstall, open Application Folder ->add ->file ,

Then enter C:\Windows\System32 in the address bar, fill in msiexec.exe in the search bar, and click open .

Then create a shortcut for msiexec.exe and rename it to Uninstall ,

After creating the Uninstall shortcut, click the property of SetUp, copy the content in ProductCode,



Paste the copied ProductCode content into the created Uninstall property Arguments, and add "/X" before ProductCode

Notice:

If there are special packages such as: framework dependent version or other software that needs to be installed offline, you can put the dependent package in the installation package

The specific operations are as follows:


Output file name is the directory where you want to output the packaged file. After the package is complete, you can go to this path to find the installation file.


At this point, you can directly Builder Setup, and the packaging has been completed.

The database I use this time is SQLite, so there is no username and password, and the database is directly encapsulated.




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324783437&siteId=291194637