I find this painful as well. You can easily launch pre and post events with msbuild, but making those tools platform and tree location independent is a bit of a pain. Likewise, getting the generated C# files into the build requires extra steps because of C# integrated compile and link (compared to c and make files).
The strategy I use is msbuild/xbuild with pre/post events that are CLR program "sub projects" so they are portable without more toolchain pain. (I use this strategy for XML/xslt based code templating, for example) I manually add the generated C# to the csproj. Another strategy (which i have not tried) is to use NAnt. http://developer.empinia.org/empinia/HowToUseNant sent via mobile On Oct 4, 2013 3:05 PM, "Sandro Magi" <[email protected]> wrote: > Pre-build events are easy in msbuild, but they're essentially just a batch > script with various environment variables like I said. You can also write > custom msbuild tasks [1,2], but I've never needed to dig in that deeply. > > Sandro > > [1] > http://msdn.microsoft.com/en-**us/library/t9883dzc.aspx<http://msdn.microsoft.com/en-us/library/t9883dzc.aspx> > [2] > http://msdn.microsoft.com/en-**us/library/vstudio/z7f65y0d.**aspx<http://msdn.microsoft.com/en-us/library/vstudio/z7f65y0d.aspx> > > On 04/10/2013 3:11 PM, Sandro Magi wrote: > >> I believe batch scripts and T4 templates [1] are the most common ways of >> dealing with code generation that isn't inherently supported by Visual >> Studio (ie. design time tools). >> >> Sandro >> >> [1] >> http://msdn.microsoft.com/en-**us/library/vstudio/bb126445.**aspx<http://msdn.microsoft.com/en-us/library/vstudio/bb126445.aspx> >> >> On 04/10/2013 2:14 PM, Jonathan S. Shapiro wrote: >> >>> I'm struggling with something fairly trivial, and would appreciate >>> assist. >>> >>> The Visual Studio build system is not (historically, at least) very good >>> about building /inputs/. So for example, if you have a parser generator >>> that generates a C-sharp program, that's a pain to do. I'm actually using >>> Xamarin Studio, which seems to follow the same sort of practice. >>> >>> How do people who use such tools integrate them into their project build >>> systems properly? >>> >>> Thanks >>> >>> >>> Jonathan >>> >>> >>> ______________________________**_________________ >>> bitc-dev mailing list >>> [email protected] >>> http://www.coyotos.org/**mailman/listinfo/bitc-dev<http://www.coyotos.org/mailman/listinfo/bitc-dev> >>> >> >> >> >> >> ______________________________**_________________ >> bitc-dev mailing list >> [email protected] >> http://www.coyotos.org/**mailman/listinfo/bitc-dev<http://www.coyotos.org/mailman/listinfo/bitc-dev> >> > > > > _______________________________________________ > bitc-dev mailing list > [email protected] > http://www.coyotos.org/mailman/listinfo/bitc-dev > >
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
