Build another project by prebuild event without adding reference

Govind Malviya picture Govind Malviya · Jun 5, 2012 · Viewed 8.4k times · Source

I am copying .exe file form a separate to my main project's folder on prebuild event but I need to build that project before build my main project so i want to build that project on prebuild event of my main project.

Answer

Jason Pugh picture Jason Pugh · Nov 9, 2012

Not that this is the best solution, but it will definitely work for what you want to do: Put the below into your pre-build event

"$(VS100COMNTOOLS)..\IDE\devenv" "csproj location OR sln location" /Rebuild "configuration required if you have more than configuration ex: Debug|x64"