|
Unfortunately, unlike Visual C++, Visual C# does not have built-in support for conditional build events. All it can do is run a pre-build event unconditionally every time a project is compiled. The pre-build event is need to compile the Slice files, but we don't want to compile all the Slice files every time--we only want to compile them if they've been touched.
So, generatecs.exe is a pre-build command that does that. (It's a poor man's make.) In essence, all it does is check whether, for a particular Slice file, the corresponding C# file exists and has a time stamp that is older than the time stamp of the Slice file. If not, it compiles the Slice file. The additional args are just arguments that are passed through to slice2cs.
You can find the source code for generatecs.exe in the generate subdirectory of the C# distribution.
Cheers,
Michi.
|