AlphaModder
AlphaModder

Reputation: 3386

Run code through external application before compiling in visual studio 2010 (C#)

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.

Upvotes: 1

Views: 1087

Answers (1)

Greg Chapman
Greg Chapman

Reputation: 41

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.

Upvotes: 3

Related Questions