Nant logging listener causes msbuild to blow up

This is in 4.5.4.9071.

As there is a known bug regarding hanging builds running from cmd - i decided to use the nant runner.

However - running it causes msbuild to blow up.

  [msbuild] MSBUILD : error MSB1025: An internal  failure occurred while running MSBuild.

if i muck about on the command line and delete the following lines:

-extension:E:\BuildAgent2\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NAntLoggers.dll
-listener:JetBrains.BuildServer.NAntLoggers.NAntListener

then msbuild works properly.

I am using nantcontrib-0.86-nightly-2009-02-01. - but even if i comment out the load tasks line from that (so presumably its using the TC msbuild task) then it still blows up.

I am using .net framework 3.5 (installed not from visual studio - so i have version 6.1, not 6.0a.

any suggestions gladly received.

thanks!!!

james

8 comments

James,

Could you please provide server logs and thread dump of the hanged process. Also please details which task causes hang.

0

nope - this isn't about a hung build - this is about msbuild just blowing up...

the blow up looks like this:




Target(s) specified: ci.unit

[echo] Building MyApplication-2.8.16.0
[loadtasks] Scanning assembly "NAnt.Contrib.Tasks" for extensions.
[loadtasks] Scanning assembly "Macrodef" for extensions.
[macrodef] Scanning assembly "pemgfe9a" for extensions.
[macrodef] Scanning assembly "l26-benr" for extensions.
[macrodef] Scanning assembly "prk5lr07" for extensions.

clean:


compile:

[set-assembly-version] assembly-info-file = 'PBT\AssemblyInfo.cs', assembly-version = '2.8.16.0'
[script] Scanning assembly "m3jexl-l" for extensions.
[msbuild] MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
[msbuild]
[msbuild] Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
[msbuild] at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, BuildPropertyGroup propertyBag, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Boolean needToValidateProject, String schemaFile, Int32 cpuCount, Boolean enableNodeReuse)
[msbuild] at Microsoft.Build.CommandLine.MSBuildApp.Execute(String commandLine)
[msbuild] at Microsoft.Build.CommandLine.MSBuildApp.Main()

BUILD FAILED - 0 non-fatal error(s), 5 warning(s)

E:\BuildAgent2\work\de4e4f3b036d67d3\build\nant\PBT.build(50,6):
External Program Failed: msbuild (return code was -1073741819)





So, no hang - just blown up msbuild... :-(

0

ok so i found that if i edited the tcargs file from this:

/nologo
/noconsolelogger
/verbosity:quiet
/property:"Configuration"="Debug"
/target:Build_TeamCity_generated_f413ffce0823469cb13b8d2f8ebde7d6
"/l:JetBrains.BuildServer.MSBuildLoggers.MSBuildLogger,E:\BuildAgent1\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll"

to this

/nologo
/noconsolelogger
/property:"Configuration"="Debug"
/target:Build_TeamCity_generated_f413ffce0823469cb13b8d2f8ebde7d6
"/l:JetBrains.BuildServer.MSBuildLoggers.MSBuildLogger,E:\BuildAgent1\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll"

ie got rid of the verbosity - it doesn't blow up.... hmmm.... now to try to make this not happen from the build itself......

0

Could you please check if NAnt/msbuild will work if start MSBuild from commandline.

Please attach the part of NAnt script where msbuild is started.

0

Yes - all the detail you need is in the post i think.

it does work form the command line - i said that already. I've included two versions of the msbuild args - one that works, and one that doesn't.

is there any more info you need?

cheers!

James

0

Ok,

Do you start msbuild.exe from commandline using <Exec> task? What will be the result if start msbuild in that way.


Could you please attach a part of NAnt script that starts msbuild (using <msbuild> task).

0

<msbuild project="PBT.sln" verbosity="${msbuild-verbosity}">
      <property name="Configuration" value="${msbuild-configuration}"/>
    </msbuild>

0

Could you please try the following:
- start msbuild using <msbuild> task with verbosity set to 'diag': /verbosity:diag
- start msbuidl using <exec> task of NAnt

Make sure you set 'teamcity.agent.dotnet.debug' build property with value 'true' in the build configuration settings.

Please attach produced build logs.

Do you have any msbuild extensions installed for MSBuild?

0

Please sign in to leave a comment.