Title: csc Task Strategies
We have a similar issue with both references and files. In some cases developers were checking in files that weren't included in the csproj file, but would get picked up by the csc task fileset (**\*.cs). To resolve this we built our nant scripts to parse the csproj files at build time to determine the references, files, assembly name, etc.. for compilation. It worked out pretty well.
 
Our solution is so big (~74 projects), we had issues getting the solution task to work. This was a nice compromise...
 
-Mike


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Witmyer
Sent: Monday, July 11, 2005 8:09 AM
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] csc Task Strategies

I recently moved to a new company and I'm trying to implement NAnt in a relatively complex build environment.  My hope is that I can bring some order to a relatively chaotic environment.  We have a ton of different assemblies that make up our business logic.  Any one assembly might reference quite a few other assemblies.  To make matters worse, the version numbers on those assemblies change frequently.  That scenario makes the csc task in NAnt a challenge because the developers must update the build script every time they change a reference.

The developers are understandably not too keen on the idea of manually maintaining these references in the build scripts.  They have proposed hooking into VS.NET's build process to mine the .csproj files and rebuild the csc tasks in the build scripts.  I'm a bit hesitant because I'd rather not abstract and automate the build scripts too much (for various reasons) plus I'm not a huge fan of integrating with VS.NET so that the user is forced to rebuild their build scripts every time they compile.

My question then, is what other people are doing to address this issue.  Basically, how do you keep your csc task references in line with reality in an environment that makes heavy use of frequently changing references?  I'd rather not use the solution task because I feel that the csc task ultimately provides for a more controlled and granular build environment.  However, using the solution task is increasingly looking like the best way to go.  Csc seems to be better suited to more stable projects (such as NAnt itself, which only makes use of a few relatively stable references).

Any thoughts on the matter would be much appreciated.

Reply via email to