Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

MSBuild task fails in Bamboo

Alexan Sedrakyan July 2, 2015

Our company has an Atlassian Cloud subscription and we want to automate our product's build process with Bamboo but we have some troubles with it.
We use MSBuild 12.0 to build Visual Studio 2013 solution on the Windows Server 2008 64bit. We use bamboo user to run tasks via bamboo agent, who doesn't have administrative permissions.

When we run MSBuild manually from the command line, while logged in Windows instance via Remote Desktop Client everything is fine, but if we run same command as a task it fails in two different places:
1) First error occuires during ClickOnce signing.
(_DeploymentComputeClickOnceManifestInfo target) -> 
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(3450,5): error MSB3482: An error occurred while signing: Failed to sign <...\path\...>\<ApplicationName>.exe. SignTool Error: An unexpected internal error has occurred.[C:\build-dir\<...\path\...>\<ApplicationName>.csproj]
2) Second error occuires during InstallShield installer creation.
(Build target) -> 
C:\Program Files (x86)\MSBuild\InstallShield\2013Limited\InstallShield.targets(108,3): error : -7159: The product license has expired or has not yet been initialized. [C:\build-dir\<...\path\...>\<ApplicationName>\Setup\Setup.isproj]

The only difference that we found between these two methods is environment variables values. HOMEPATH and HOMEDRIVE variables are empty in the task mode, but they have values in logged mode.
What can cause these kind of errors? We want to understand differences between Bamboo agent and normal command line.

2 answers

0 votes
Alexan Sedrakyan July 2, 2015

I configured with Task Scheduler, run agent as batch command.

https://confluence.atlassian.com/display/BAMBOO/Creating+a+custom+elastic+image+-+Windows

Seems there was guy who had same problem:

A follow up to Mark's comment is that the environment variables TEMP & TMP are both set to c:\windows\temp on the EC2 Intance of Windows Server 2012 R2.  This causes all kinds of pain with Visual Studio 2013 and MSBUILD 12.0 .  I had to set these to a writable location as the Windows folder is protected.  Wasted lots of time trying to figure why my builds failed when launched from bamboo, but worked via command line on the EC2 Image.

 

0 votes
marc botermans July 2, 2015

Hi Alexan,

Did you configure the Bamboo agent software to run as a windows service? I bumped into a similar issue a while ago in Jenkins when using a slave configured as windows service.

Regards,

Marc

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events