Is it possible to set up a .net project with a post build event to execute a powershell script? I am using this script to generate some files. Also can I pass whether it's a debug or release build to script. An example of this would be great.
Here is an example :
First of all : you must be aware of the fact that PowerShell must be configure to execute scripts. The following line allow PowerShell to execute scripts :
Special mention here : if you are running a 64bits system you've got to take care of the fact that 'devenv.exe' the Visual Studio 2010 executable is a 32Bits exe, so you need to allow PowerShell 32 to execute scripts.
Once here you can go in your project properties and configure post build as shown here under (sorry in french) :
For example :
Here is the file '
I don't have an example, but here are some links you may find useful: