I have created a NSIS installer for all my C# projects and works great. Now I want to automated the process of building C# projects and include them in NSIS installer. Right now this process is manual, run build in visual studio, copy dll or exe and build NSIS installer.
I know Visual Studio has post-build where I can have command for each project. I want to stay away from this and have everything driven by NSIS scrip.
What I would like to do is have separate NSIS script that will build all my projects and once done build NSIS installer.
I wanted to used Visual Studio 2010 cmd tools but I can't figure out how to run batch file which sets up temporary environment variables for CMD session and call msbuild.exe after variable is set.
This calls the Visual Studio batch file to setup environment variable, which works but once it's done msbuild.exe command or any other command after that are not being called. At this point I have CMD window with all environment variables waiting for commands.ExpandEnvStrings $0 %COMSPEC%
nsExec::ExecToStack '"$0" /k ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat" MSBuild.exe"'
Any thoughts?