OK, so I readily concede that I'm a newbie when it comes to continuous integration.
That being said, I'm trying to set up a CC.NET environment to educate myself, but I'm having trouble finding the information I need to get the automated build portion set up.
As I understand it, in C# the .csproj file produced by VS 2005 and forward is a valid MSBuild file. To wit, I've been able to integrate the MSBuild task into CC.NET using the .csproj file, but I have a few issues with this:
- There's a lot going on in here that I'm not sure I really need in an automated build environment.
- I didn't create this file. I do not understand it, and that scares me. (Programming By Coincidence)
- Most of what is going on seems to be abstracted through
$(MSBuildToolsPath)\Microsoft.CSharp.targets
- As a result of 1, 2, and 3, modifying the file to include something like MbUnit seems convoluted and more difficult than it needs to be. My only real option is to include it in the
AfterBuild
section, which seems kind of like a hack to me.
So, a few questions for the CC.NET folks, the MSBuild folks, and the MbUnit folks.
- When using MSBuild, is it advisable to use the VS-generated .csproj file as the build file? Or should I create my own?
- Should MbUnit tests be part of the MSBuild file or the CC.NET file? My research seems to suggest that they belong in the MSBuild file. If that is the case, do I create a new MSBuild .proj file and check that in to CVS in addition to the .csproj file? Or does the MbUnit task become part of my .csproj file?
- Similar to question 2. If I add the MbUnit tests to the MSBuild file and end up using the .csproj file, is the
Target Name="AfterBuild"
really the section to add that information? Shouldn't there be aTarget Name="Test"
section? Using the VS generated .csproj file seems to prevent the second option.
I know there's a lot there, but most of what I've been able to find online assumes a certain level of familiarity with these topics that I just don't have -- unless I'm mistaken, the learning curve for this stuff isn't a curve at all, it's a step function. :)
Edit 1: I updated the text to be a bit more concise and to address some lingering questions I've had with the answers.