Does anyone know of a utility to preprocess a C# source file without compiling it, in a similar fashion to using the -E flag in GCC? I tried using GCC - it successfully proc
I'm not aware of a preprocessor for C# that would allow you to export a subset of your source code without building it.
However, You should be able to achieve the same effect by using a code generation template. Just change to the preprocesor directives to the appropriate template equivalent.
Visual Studio 2008 has a built-in code generation tool called T4. There are other third-party options like CodesmithTools or the free MyGeneration.Net