Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS with no warranties, and confer no rights. Additionally, views expressed herein are my own and not those of my employer, Microsoft.
While researching a previous blog post, I discovered a way to configure post-build events for setup/deployment projects in Visual Studio 2005. I had not realized that previous versions of Visual Studio did not support configurable post-build events for setup projects, but Visual Studio 2005 does. In addition, the way to access the UI needed to configure this setting for a setup project is different than for other project types in the Visual Studio 2005 IDE.
The following steps can be used to add a post-build step to your setup/deployment project:
You can also configure a pre-build event in a similar manner - there is also an item in the Properties window named PreBuildEvent.
As I described in this previous blog post, it can be useful to run a script as a post-build event if you want to automatically modify the MSI that is built as a part of your project to include settings that are not available as part of the setup/deployment project options in the Visual Studio IDE UI.
Thank you so very much for pointing the way to something that seems so simple, but, since it deviates from the norm, is not intuitive at all. I don't know how many times I have worked on the properties window and never saw these "special" properties. This blog is almost a year old, but still relevant!
Hello,
We've just run into a very strange behavior associated with post-build events. Everything was working fine. However in the last couple days the post-build event started firing pre-build. Has anyone else seen this behavior?
We're in the middle of investigation and one things we are looking at are recently applied security kb's
kb937060
kb925674
Hi Samjac - I'm sorry, but I've never heard of an issue like this. I'd suggest searching for related bugs on the Visual Studio bug reporting site (http://connect.microsoft.com/visualstudio/) and reporting a new bug if you don't find one.
It might also help to search for help on the Setup and Deployment Projects forum at http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=6&SiteID=1.
I'm sorry I'm not able to be more helpful in this scenario.
Thanks! It helps me out!