Nantes Builds Failure - But Only in TeamCity

I have a nant build file that works fine from the cmd line, but not in TeamCity.

I checked that the command that I run is launched from the same directory in which TC works, and checked all the links, but it still does not work with the following error:

[build] Compile the project using Debug configuration...
[10:30:05]: [build] msbuild (1m:18s)
[10:30:06]: [msbuild] Starting MSBuild...
[10:30:07]: [msbuild] Starting 'C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe (@"G:\TeamCity\buildAgent\work\9de21b975852dd95\src\Irm.Web.App\Irm.Web.App.sln.teamcity.msbuild.tcargs")' in 'G:\TeamCity\buildAgent\work\9de21b975852dd95'
[10:30:09]: [msbuild] MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
[10:31:18]: [msbuild] Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
[10:31:18]: [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)
[10:31:18]: [msbuild] at Microsoft.Build.CommandLine.MSBuildApp.Execute(String commandLine)
[10:31:18]: [msbuild] at Microsoft.Build.CommandLine.MSBuildApp.Main()
[10:31:24]: G:\TeamCity\buildAgent\work\9de21b975852dd95\Irm-deploy.build(22,10): External Program Failed: msbuild (return code was -1073741819)

Does anyone know why TC will not be able to run the assembly, but I know that it works?

Greetings

w: //

+3
source share
3 answers

TeamCity Build Agent . script -, ( ), :

  • ,

  • ,

Windows - / /

+9

. msbuild? , , - .

. ( ).

+3

The city team agent is working under a different user than the one you are using. If I remember correctly, you can change this when installing the agent, or you can change the user who runs the agent service.

In addition, you can refuse to start the agent as a service and start it as a regular command-line program.

+1
source

Source: https://habr.com/ru/post/1706808/