1

I have a project that needs some of the code to be dynamically edited before the project is compiled. Is there some way that I can instruct Visual Studio to send the code through some external program and then read from it's output for what to compile? I'm using Visual Studio 2010 with a C# project.

AlphaModder
  • 3,266
  • 2
  • 28
  • 44
  • You could possibly think of a better way other than passing the codes to an external program. That's not a good practice and cause error in compilation. – Tonned Aug 20 '14 at 02:37

1 Answers1

3

If your pre-compile task is relatively simple you should be able to add a "Pre-build task" through the Build Events tab of the Project->Properties dialog as described on this MSDN page. More likely you'll want to use msbuild.exe to build your project outside of the IDE; tutorials for msbuild are discussed in this question here.

Community
  • 1
  • 1