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

Problems with MSBuild

Norbert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 27, 2013

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

1 vote
Answer accepted
Norbert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 27, 2013

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

0 votes
Jason Monsorno
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 27, 2013

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.

0 votes
Julian Riedinger _Decadis AG_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 27, 2013

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events