Unable to configure a VisualStudio task in Bamboo to successfully build a Solution

I am trying to setup a VisualStudio task to compile our source code, which is a mix between C++ and Fortran code. We are able to compile our code on the command line by executing:

C: Program Files (x86) Microsoft Visual Studio 9.0 Common7 IDE devenv.com Solution.sln Build Release|Win32

When I try calling a VisualStudio task with the following settings:

Solution: Solution.sln

Options: '/Build Release|Win32'

Platform: x86

Environment Variables: <list of="" required="" env="" variables="">

I get the following:

Beginning to execute external process for build 'SADM - Branch 5.2.0 - Win32 Build'

... running command line:

E: bamboo-home DotNetSupport devenvrunner.bat

E: bamboo-home xml-data build-dir SDM-BR520-JOB1

C: Program Files (x86) Microsoft Visual Studio 9.0 x86

Solution.sln

/Build Release|Win32

... in: E: bamboo-home xml-data build-dir SDM-BR520-JOB1

... using extra environment variables:

MAS3P=E: mas3p

FLEXNET_BASE=E: 520_branch sadm-utilities-x64 flexnet-publisher-11.9.1

MATLAB_VERSION_32=C: Program Files (x86) MATLAB R2010a

16-Oct-2012 16:29:16 'Win32' is not recognized as an internal or external command,

16-Oct-2012 16:29:16 operable program or batch file.

The problem is devenvrunner.bat is interpreting the |Win32 as a pipe command to the Win32 program, which fails.

I would rather being able to call devenv.com directly, instead of using devenvrunner.bat. I thought I could achieve this by adding a new executable to the Visual Studio task, so I created one called Devenv with value C: Program Files (x86) Microsoft Visual Studio 9.0 Common7 IDE devenv.com

However, when the task has this executable selected (Task Executable says: Devenv instead of Visual Studio 2008) Bamboo still calls the devenvrunner.bat. I'm not sure if this is the correct behaviour. Otherwise what is the difference in setting the Executable to use?

I hope I have provided enough information so that you can help me.

2 answers

1 accepted

0 votes
Accepted answer

Update: I received a response from a support member, Armen Khachatryan.

His response is given below:

Thanks for the update. Are you running your Bamboo server and remote agent (if you use one for this plan) as windows service or from command line? Can you please try both? Also, make sure to use a local admin user when you run it as a Windows service as per this document. Let me know if that makes any difference.

Cheers,
Armen

The answer was to ensure the Bamboo server windows service was running as the local admin account, instead of a SYSTEM account. The instructions to do this are on the website linked in his response. I also had to use a script task and call devenv.com directly, instead of using the VisualStudio task.

Very good writeup Nick. If you don't get any answers here, you should also try our support team at https://support.atlassian.com

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Dec 06, 2018 in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

5,581 views 22 17
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