I have a MSBuild script that builds my windows forms application, generates the application manifest and signs it, then generates the deployment manifest. The script also generates the publish.htm file for me.
Now I need to generate the setup.exe file and so far I have not been able to figure out how VS generates it. How can I generate the setup.exe file using a MSBuild script?
Thank you in advance for your help!
You can use the built-in GenerateBootstrapper MSBuild task
When you do a Publish from Visual Studio, this is also what ClickOnce uses.
Check out C:\Windows\Microsoft.NET\Framework\\Microsoft.Common.Targets to see exactly what happens.
Look at the _DeploymentGenerateBootstrapper target.
Your CSharp project file contains some items and properties that this target uses to figure out:
Hopefully this makes sense. With a bit of work you can implement with your MSBuild file exactly what happens when you Publish from Visual Studio.