Bamboo: .NET Setups

Are there any samples around of different approaches to configuring a .NET build process using Visual Studio as the builder?

I've been trying multiple jobs in a stage, multiple stages in a job, and dealing with having lots of different test projects within a solution. So it would be useful if there was a guide to good/best practice in this area.

2 answers

1 accepted

This widget could not be displayed.

Not that I'm aware of. We have also been using Bamboo for .Net builds. Our solutions are either a web site and many business layer projects, or a web service with associated business layer projects.

We have set up the web site and web services as web applications in VS. That way we can use the publish target to put everything into a zip and use the generated deploy.cmd to deploy to IIS.

So our first stage does our builds - up to 3 different configurations, debug(dev), test(qa) and release(live). Each build is a job in that stage so they can be done in parallel. Each job has a task that versions the dlls based on the version in JIRA and then creates shared artifacts so we can use them later on in the process without having to check everything out of SVN again. So we have 3 packages and then all the test dlls and test config files (vsmdi, etc.)

In the next stage, we run all our unit tests and code coverage (using NCover) by re-using the debug package.

In the next stage we deploy to IIS by calling the project.deploy.cmd that VS spits out when you call msbuild webproject.csproj /T:Publish

We then have another stage which is a manual stage which deploys to test. That way we can do some manual testing before we deploy to QA. Once QA is happy, we have another manual stage to deploy to live.

Hope that helps?

Thanks Bernard. I was starting to head down the artifacts as inter-stage communication route but wasn't sure on whether I was about to waste a lot of time :)

This widget could not be displayed.

I found the following ANT exec line to be effective. It calls the visual studio environment setup batch file, then invokes the solution build. If the compile/build fails, exec is returned a nonzero exit code, so ANT can act appropriately. Build output is written to a file, useful for diagnostics.

<exec executable="cmd.exe" failonerror="true">
   <!-- execute a command which sets up and invokes the visual studio solution builder -->
   <arg value="/s /c &quot; call &quot;%VS100COMNTOOLS%/vsvars32.bat&quot; &amp;&amp; devenv.exe ${gui.solution.file} /rebuild Debug /Out ${gui.build.logfile} &quot;"/>
</exec>



Suggest an answer

Log in or Sign up to answer
Community showcase
Asked yesterday in Data Center

Hi! I'm Cameron Deatsch, enterprise enthusiast and Head of Server at Atlassian. AMA!

Hey team! I'm Cameron Deatsch, Head of Server at Atlassian. At our European Summit just a few weeks ago, I spoke about the latest regarding our Server and Data center products and o...

12,446 views 2 4
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you