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.
Asked
Active
Viewed 995 times
1
-
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 Answers
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

Greg Chapman
- 41
- 4