Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Calling MSBuild using YAML Bamboo Specs

Bamboo Version: 6.9.2

I'm in the process of converting the majority of my organization's plans to use Bamboo's YAML Spec for our build and deployment processes to benefit from all the goodness that configuration-as-code brings to the pipeline.

I'm running into a bit of a snag trying to add a build task that uses MSBuild to compile solution files. I see that I should be able to reference execute capabilities using a script entry (documentation here), but I don't think I'm using the right variable name.

version: 2

# <plan-info>

- Build:
- Build

- clean
# <some-build-steps>
- script: "${system.builder.msbuild.MSBuild v14.0 (32bit)} solution.sln"
# <more-build-steps>
- "system.builder.msbuild.MSBuild v14.0 (32bit)"
# <artifacts>

It looks like the error is that the ${system.builder.msbuild.MSBuild v14.0 (32bit)} variable isn't being changed to the executable path in the build log's error file:


I've tried to escape the spaces with single/double backslashes (documentation here), but I still get the same error, just with an added backslash after msbuild.MSBuild.

The agent capability does show up in the stage's requirements, so I'm not quite sure what I'm missing in the script entry.


If anyone can point me in the right direction, I'd be super grateful! I'm 99% sure that my ${system.builder.msbuild.MSBuild v14.0 (32bit)} variable is the problem, I just don't know how to modify it so that it gets changed to the actual executable path.

1 answer

1 accepted

3 votes
Answer accepted

Good news! I found the problem. Replacing the script entry with the following calls MSBuild successfully.

- script: "\"${bamboo.capability.system.builder.msbuild.MSBuild v14.0 (32bit)}\" solution.sln"

 Thanks to this post here that hinted at what I was missing!

I'd like to suggest to the Atlassian team that the YAML Bamboo Specs documentation be updated to include the bamboo.capability prefix when referencing an executable; it might be obvious to more seasoned Bamboo users, but it would help new users like me out greatly.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

954 views 3 8
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you