views:

277

answers:

5

I want to set my server to automatically build my application upon commit on SVN repo, then deploy on a test/homologation server.

What I planning to do:

  • install a build tool (Nant? use MSBuild?);
  • create a simple script and set a hook to SVN that starts the process of building and deploy.

To do that, what I need to install on my server desides the .NET 3.5 framework? Is Nant capable of build our application based only on our solution file (.sln)?

I researched a little bit, and the Nant last release, v0.86 beta 1, does not include the solution target.

Is there other alternative to do that?

Note that currently I only use the VS2008 build system, and do not call the MSBuild directly. Is that feasible and simple to setup on server environment?

+2  A: 

Just use CruiseControl.NET or TeamCity. They're both fully-fledged continuous integration servers with lots of features and easy to configure.

Mauricio Scheffer
+1  A: 

You could use Hudson or Cruise Control for it.

They are Continuous Integration Servers, and can also run your unit tests before deploying it.

mkato
+1  A: 

I think you are looking at installing Cruise Control.Net. It will handle automatically checking your SCM repository, and kicking off anything build related you want.

http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET

As for NAnt or MSBuild - it's a personal choice. I went with MSBuild as NAnt hasn't been updated in a while. That being said - they are both capable of doing whatever it is you are looking to do.

One note - if you compile in Visual Studio - you are using MSBuild. You can target the SLN or PROJ files with MSBuild through Cruise Control.net.

rifferte
+1  A: 

I use Teamcity and it was very easy to set up. Before that I used plain Nant. The Teamcity server realy changed things, because now everybody in the team understands what is going on on the buildserver.

It is free for up to 20 project configurations.

For Asp.Net you will also need Web Deployment Project on any type of buildserver you choose.

Are you realy shure you need to build sln? For a typical ASP.NET project this is not the best way. You usually build a WebDeploymentProject. Anyway Teamcity (and other buildservers I guess too) understands sln-files.

Malcolm Frexner
I am not sure, but I need to build sln just to show my fellows that is possible to automate that process. After that I´ll work on the Web Deployment Project =) Need to present new features slowly...
Seiti
Thats a clever strategy. I even had the buildserver running a couple of weeks before I told the team. I prefer if they look over my shoulder and tell me that they also want it.
Malcolm Frexner
+1  A: 

We use Hudson to do that. Like mentioned before. It supports MsBuild (and Nant). We use msbuild with as paramters the solution file and the build configuration like debug/release (we created a deploy and watin configuration with different web.config's). No extra tasks or different scripts than the solution file we us in visual studio. (which I think is the setup you're after)

Additionally before deployment we setup a webserver (cassini) with the results of the build execute nunit (watin) tests. All through Hudson, which shows a nice diagram of the nunit test results.

TeamCity and CruiseControl.Net should be capable of doing the same thing,but I found hudson to be a snap to setup, and configure. (It has everything included in a package just start it)

What's also nice is that it supports SourceCop and FxCop results which you can view in a diagram and look at the location a certain warning applies to in the sourcefile, all using the web interface.

Cohen
I´ll research on that. Just one more question. Do I need to install a Visual Studio copy on server or just copying the msbuild directory is enought (as I read somewhere...)?
Seiti
Found out that the msbuild.exe is installed with the .Net Framework.... By the way, I installed and configured Hudson. It´s really a nice piece of software. Easy to install, easy to configure.
Seiti
I found so too, I still don't have any complaints about it. Next month we will be try building with agents from different VM's with different OS platforms. I can't wait to try it out.
Cohen