MSBuild failed from nant when verbosity="Quiet"

I am calling msbuild task from nant (nant-0.85) to build a  c# dotnet solution.
when i mark verbosity="Quiet" in the msbuild task i am getting the following error. With out verbosity="Quiet" , it is working fine.

This is the error i am getting

[echo] Build CommonServices solution
[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)

D:\Snapviews\TEP Projects\Console\build\build13620.tmp(13,4):
External Program Failed: msbuild (return code was -1073741819)


Below is my nant script

<?xml version="1.0"?>
<project name="Scanner" xmlns="http://nant.sf.net/release/0.85/nant.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nant.sf.net/release/0.85/nant.xsd http://ilqhfaatc1msctc/nant.xsd">
<property name="MSBuild.Configuration" value="/p:Configuration=Release"  overwrite="false" />
<property name="MSBuild.Platform" value="/p:Platform=x86" overwrite="false" />
<property name="MSBuild.Verbosity" value="/v:quiet" overwrite="false" />
<property name="MSBuild.TreatWarningsAsErrors" value="/property:TreatWarningsAsErrors=true" overwrite="false" />
<property name="MSBuild.MaxCpuCount" value="/maxcpucount"  readonly="false" if="${not property::exists('MSBuild.MaxCpuCount')}"/>

<target name="pyari" description="Build Scanner vob">
  <echo message="${datetime::now()}, Start of ${target::get-current-target()}" />
  <echo message="Build CommonInterfacesAndServices solution"/>
  <msbuild
   project="..\TepSample.sln"
   target="Build"
   verbosity="Quiet">
   <arg value="${MSBuild.Configuration}" />
   <arg value="${MSBuild.Platform}" />
   <arg value="${MSBuild.TreatWarningsAsErrors}" />
   <arg value="${MSBuild.MaxCpuCount}" />
  </msbuild>
</target>
</project>
Please help me out to resolve this issue

1 comment

Do you have stacktrace of the issue?
Does it reproduces if you start this build script without TeamCity?

Could you please try running it with NAnt debug option. Please attach the result.

0

Please sign in to leave a comment.