Bamboo dot-net plugin
Asked by patrickams:

Hi,

is it possible to use the Bamboo .net plugin?

[https://bitbucket.org/atlassian/bamboo-dotnet-plugin](https://bitbucket.org/atlassian/bamboo-dotnet-plugin%20)

Thanks,

PAtrick


Answers:
author: Gretchen Jones
body: I use it. We have two plans running against a branch and the trunk of a svn repository. (release, and nightly builds respectively)

I set up the shared repository to point to the branch or the trunk (depending on the shared repository). (This may not be correct, but it's working so ...).

Configured three MSBuild options (3.5, 4..., and devenv)

We made sure that we could get a good compile from the command line then popped the same command into the build task.

We have about 53 tasks in each plan. Before you'll ever get it to work in bamboo you must be able to do the build successfully from the command line.

Our build tasks look like this:

Project file: ./myAppFramework/Source/myAppFramework.sln (this is the first of 50+ tasks so many csproj and sln files are compiled in various tasks)

using 32bit MSBuild 4.0

The repository looks like this:

[https://svn.myco.com:8443/svn/myreponame/trunk/\</span\<\>\>](https://svn.myco.com:8443/svn/myreponame/%3Cspan%3Etrunk/%3C/span)
[](https://svn.myco.com:8443/svn/myreponame/%3Cspan%3Etrunk/%3C/span)

[and for the branch release build:](https://svn.myco.com:8443/svn/myreponame/%3Cspan%3Etrunk/%3C/span)<https://svn.myco.com:8443/svn/myreponame/branches/2012.01.31B_v2.0.0/>

The only issue I have is with the browser that has /trunk/trunk in the path probably because of how I'm doing the repository url's.

This was not a piece of cake to figure out, but once stable it's solid. The main thing you need is a developer who understands how to build .net applications from the command line (not the ide). That's the really hard part.

comments: author: minzdrav
body: Hi Gretchen Jones

Can you show me example of your building script? My script works only on local machine :(


author: Gretchen Jones
body: Most likely the reason the build works on the local machine is because your build machine is not configured correctly (or the same as your local machine) with regards to all the dependencies. (MS Framework, 3rd party libraries, paths, environment variables etc.) You'll need to debug your build from the command line just like you would if you were building it from the ide.

With Visual Studio developers get used to MS doing all the heavy lifting with regards to the environment and that is what makes building from the command line so difficult if you're not used to standing at the c:\\ prompt by yourself.

So first on your local machine go to a c:\\ prompt your build command should look something like this:

C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /target:package "c:\\WS\\svn\\MyProject\\Source\\Application.Web\\Application.Web.csproj"

WS is where I put all my workspaces, my subversion output is stored in svn directory as MyProject.

You can put that in a bat file or paste it on the command line. run it and debug your build. Your target may vary. We are producing distribution objects without source so we use the package target.

Look out for spaces in your pathnames. You'll need to quote any string that has a stinking space in the name. Watch out for pathnames that are too long for microsoft.

Once that works at the command line take the command and try that in bamboo.

You'll need to adjust for the path because the workspace will actually by somewhere under xlm-data/build-dir etc. Trial and error will be required. You may need to delete and recreate folders where objects are stored. This is why you need to get the build to run from the command line before you bother with bamboo.


author: minzdrav
body: My script:

C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /target:Build "D:\\Work\\Projects\\\<Project\>\\svn\\trunk\\\<Solution name\>\\\<Project name\>\\\<Project name\>.csproj"

It's works fine from command prompt. When I try this script in bamboo it's doesn't work. Error:

No agent can build this Job.


author: Gretchen Jones
body: Okay, Your next step would be to make sure 2 things, first make sure you've got the msbuild tools set up correctly on the bamboo machine. Go to Executables in the Administration function and make sure that your MSBuild executables are configured correctly. You'll need to do this for each executable that you use. Check that and get back to me.


author: minzdrav
body: I can't do that. We use on demand version. Not installed on own server.

Thank you for helping.


author: minzdrav
body: Hi Gretchen Jones

Can you show me example of your building script? My script works only on local machine :(


author: Joe Clark
body: Yes, the Bamboo .NET plugin is included with Bamboo by default.

comments: author: minzdrav
body: Hi Joseph

Can you help me to enable and configure this builder?

List of available builders: <http://dl.dropbox.com/u/204009/build.png>

I think latest builder it's what I need. But I can't setup this builder.


Tags: cloud