Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best method for setting up a new .NET project?

So I'm newly in charge of projects at my company (We're still only 2 guys, but we're growing) and I want to set up my projects the right way.

All my projects are in an SVN repo already, I've got bug tracking software set up, but what I'm looking for is the best way to layout a new project with tests, SVN, and a build server. I want to set up all our new projects for CI, but I'm not sure exactly how to lay everything out so it as smooth as possible.

I know I need:

  • A build server
  • All build/testing materials in the SVN repo (including DB schema)
  • A project layout that's conducive to CI

How do you guys set up your projects? I want to use MSBuild for my build server, since everything is already set up that way thanks to VS, but I'm also looking for tips on how files should be laid out, how projects should be laid out in a solution, etc. As it stands, I've got about 5 projects in my solution, one of which is the testing project that contains all the tests for the rest of my projects. Is this the preferred method?

How about layout inside your repository? Where do you keep your DB related stuff? Specs and documents?

Do you use any particular software for CI, or just follow the "Continuous integration is more like a state of mind" mantra?

In general, I'm looking for tips on getting a new project off the ground the right way, so everything proceeds as smooth as possible later on, as well as being easy for new developers to get acquainted to.

like image 538
Alex Fort Avatar asked Jan 08 '09 14:01

Alex Fort


5 Answers

Tree Surgeon - http://www.codeplex.com/treesurgeon

"Tree Surgeon is a .NET development tree generator. Just give it the name of your project, and it will set up a development tree for you in seconds. More than that, your new tree has years worth of accumulated build engineering experience built right in."

like image 118
quimbo Avatar answered Nov 13 '22 15:11

quimbo


Alex,

I'd suggest you start here: http://msdn.microsoft.com/en-us/library/ms998208.aspx

That covers Microsoft's own project structure recommendations. By the sounds of it you should indeed look to stick to the single solution architecture.

In terms of a particular CI platform, there are obviously several options available. Some of this comes down to taste as well as functionality. Searching the net should give you most of the answers you need on the pro's and con's front!

Nick.

like image 36
Nick Avatar answered Nov 13 '22 14:11

Nick


Cruise Control is a great product for Continuous Integration. Another option that is a little "easier" to set up is Jet Brains's TeamCity.

like image 29
cgreeno Avatar answered Nov 13 '22 14:11

cgreeno


I'll second the vote for Cruise Control as CI, and note that CruiseControl.NET integrates very nicely and easily with MSBuild.

like image 28
MattK Avatar answered Nov 13 '22 13:11

MattK


So I change my structure as I learn but currently:

(SVN REPO)
/trunk
  MyProject  <-- solution & .build file (i use nant or msbuild)
    conf <-- IIS Settings etc go here
    docs <-- that documentation i never do
    lib <-- 3rd Party libraries eg ApplicationBlock,ASPNet MVC
    src
      Web
      Data
      Business
    test
      Web.Test
      Data.Test
      Business.Test  
    tools
      nant
      nunit
      moq
  Project2
    conf
    lib
    src
    test
    tools
/branches
/tags

Hopefully you should see my structure above

like image 22
danswain Avatar answered Nov 13 '22 14:11

danswain