Rebuilding from command line /rebuild

  • Thread starter Thread starter Dyl
  • Start date Start date
D

Dyl

Hello,

I am trying to use an executable which when an option is clicked, it
goes out and rebuilds a .sln file.

I read about devenv and /rebuild, but I am still confused.

Would I run something from a command prompt using a process?

Any help would be appreciated, if you could give an example that would
help a lot.

Thanks!
 
It's fairly easy to rebuild a solution file with devenv.exe:

devenv "FullPath\Solution.sln" /rebuild release

However, you need to set the environment variables as found when starting a
new Visual Studio Command Prompt in the ProcessStartInfo. I think it's much
easier to create a .bat file on the fly and start this instead of doing it
all from code.

Michael
 
Back
Top