I'm having some trouble using mono msbuild/xbuild functionality.. I believe the problems are stemming from the correct working directory not being used, but I am not certain what exactly to do at this poing. I set a dummy project that has two projects in it one called TestApp and one called Data, TestApp references data. The directory structure has Data and TestApp in the root checkout directory. From there I build TestApp/TestApp.csproj. It is coming back and telling me it can't find two of the files that are in the TestApp project. When I look I see that they are there. Below is a snippet of the log file:
[2009-05-06 05:45:15,689] out - TeamCity MSBuild bootstrap v4.1 Copyright (C) JetBrains s.r.o.
[2009-05-06 05:45:15,770] out - Start MSBuild...
[2009-05-06 05:45:15,773] out - '/opt/mono/bin/mono' '"/opt/mono/lib/pkgconfig/../../lib/mono/2.0/xbuild.exe" @"/opt/buildAgent/work/15a55bd5ad5e72c/TestApp/TestApp.csproj.teamcity.msbuild.tcargs" "TestApp/TestApp.csproj.teamcity.patch.tcprojx"'
[2009-05-06 05:45:15,773] out - working dir = '/opt/buildAgent/work/15a55bd5ad5e72c'
[2009-05-06 05:45:16,637] out - XBuild Engine Version 0.1
[2009-05-06 05:45:16,638] out - Mono, Version 126.96.36.199
[2009-05-06 05:45:16,640] out - Copyright (C) Marek Sieradzki 2005. All rights reserved.
[2009-05-06 05:45:18,987] out -
[2009-05-06 05:45:18,994] out - Build started 5/6/2009 5:45:18 AM.
[2009-05-06 05:45:18,996] out - __________________________________________________
[2009-05-06 05:45:19,006] out - Project "/opt/buildAgent/work/15a55bd5ad5e72c/TestApp/TestApp.csproj.teamcity.patch.tcprojx" (default target(s)):
[2009-05-06 05:45:19,008] out -
[2009-05-06 05:45:19,038] out - Target CoreCompile:
[2009-05-06 05:45:19,270] out - Tool /opt/mono/bin/gmcs execution started with arguments: /noconfig /debug:full /debug+ /optimize- /out:bin/Debug/TestApp.exe Program.cs Properties/AssemblyInfo.cs /target:exe /unsafe- /define:DEBUG;TRACE /warn:4
[2009-05-06 05:45:19,999] out - : error CS2001: Source file `Program.cs' could not be found
[2009-05-06 05:45:20,006] out - : error CS2001: Source file `Properties/AssemblyInfo.cs' could not be found
As you can say it is saying there are missing files, further if you look it says the working_dir is the checkout directory, which is incorrect. The build property even has it listed as:
If I run xbuild on the server against the csproj file: /opt/mono/bin/xbuild TestApp.csproj it works fine. If I setup a command line project to run the xbuild executable it works fine, and is a decent work around, but I would really like to get this to work via the msbuild runner. Any insight in to what I may be doing wrong? The server where the agent is running is CENTOS 5. Thanks for your help.