输出一个在没有.Net 环境的机器也可以跑得安装包

Step by step:

1. open your solution

2. right click on solution explorer to add a setup project

3. right click on setup project new created to add a new project output, OK

4. right click on setup project and select property

5. Prerequisites, 系统必选, 将需要include的framework钩上.

6. 钩选第二项,从与我系统相同位置下载

7. rebuild, you can see the files below in debug folder:

DotNetFX40Client

                          dotNetFx40_Client_x86_x64.exe

WindowsInstaller3_1       

                          WindowsInstaller-KB893803-v2-x86.exe                    .exe

setup.exe

setup1.msi

Link:

http://www.cnblogs.com/neru/archive/2010/10/16/1852879.html

原文地址:https://www.cnblogs.com/DataFlow/p/2660049.html