0

I have 2 programs: One written in c++ and compile on MS visual studio 2010; The other written in C# and compile on MS visual studio 2010.

My second program automatically edit one of first projects file (.cpp), I want to know is there any way to auto compile my c++ code on file changed?

Thanks.

Some programmer dude
  • 400,186
  • 35
  • 402
  • 621
mefmef
  • 665
  • 2
  • 11
  • 23
  • Run a command line build of the C++ project through the C# app. Refer http://stackoverflow.com/questions/394036/how-to-execute-a-bat-file-from-a-c-sharp-windows-form-app – Gayan Jan 04 '12 at 07:00

1 Answers1

1

Yes, call msbuild.

E.g.

msbuild YourSolution.sln /p:Configuration=Release

(Or Debug, if that's what you're building for)

Sounds like your tool would be better off written as an msbuild task though.

Billy ONeal
  • 104,103
  • 58
  • 317
  • 552
  • http://stackoverflow.com/questions/536539/how-to-call-msbuild-from-c-sharp i tried this code but it is not working is there any good article demonstrating this issue? – mefmef Jan 04 '12 at 08:36