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

This widget could not be displayed.

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

This widget could not be displayed.

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

This widget could not be displayed.

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 Sign up to answer
Community showcase
Posted yesterday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

62 views 0 1
Join discussion

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