Problems with MSBuild

Hello Guys

My C++ projekt won't compile on my Bamboo testinstallation.
I'm using the msbuildtask with VS 2012. If I run it from a commandline it works fine
If i run it via bamboo it failes with the error

build	26-Aug-2013 18:07:12	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(347,5): error MSB4018: The "CL" task failed unexpectedly. [C:\data\bamboo-home\xml-data\build-dir\MYProject-IMB-JOB1\icos\common\common.vcxproj]
build	26-Aug-2013 18:07:12	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(347,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Utilities.FileTracker' threw an exception. ---> System.IO.DirectoryNotFoundException: Das System kann den angegebenen Pfad nicht finden. (Exception from HRESULT: 0x80070003) [C:\data\bamboo-home\xml-data\build-dir\MyProject-IMB-JOB1\icos\common\common.vcxproj]

What I'm doing wrong?

I also created a batch file and run it as SYSTEM User. This also works fine. so it shouldn't be a problem with User rights.

3 answers

1 accepted

Hi

I found the problem. MSBUILD cannot use the default temp directory of Windows 7
Changing the MSBUILD task to an inline task

set temp=c:\temp
set tmp=c:\temp
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /t:rebuild /p:Configuration=Release /p:Platform=Win32 /m /fileLogger cxxx2012.sln

fixes the problem. If I remove the "set temp" commandos it fails again with the same error messages

I'm not shure but the atlassian products have a problem with spaces in the path. Maybe this causes your exception. The MABuild is installt to "C:\Program Files (x86)\"...

Hope that helps

Have you tried running msbuild on the exact same checkout Bamboo is using? Run MSBuild on the files in C:\data\bamboo-home\xml-data\build-dir\MyProject-IMB-JOB1\. Your personal local copy may have an extra file that wasn't included in your Source Control.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,070 views 0 5
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot