TeamCity build step -- FAILED in MSBuild
Asked Answered
G

1

2

The solution builds successfully on my machine but not on the build server. There are the project's solution

Projects within solution

This is the MSBuild output

[13:42:17][Step 2/5] MSBuild output [13:42:17][MSBuild output] Focal.Business.Library -> D:\BuildAgent\work\9d2a77191c8abcc1\Focal.Business.Library\bin\Release\Focal.Business.Library.exe [13:42:17][MSBuild output] Copying file from "obj\Release\Focal.Business.Library.pdb" to "bin\Release\Focal.Business.Library.pdb". [13:42:17][MSBuild output] Done Building Project "D:\BuildAgent\work\9d2a77191c8abcc1\Focal.Business.Library\Focal.Business.Library.csproj" (default targets). [13:42:17][MSBuild output] Project "D:\BuildAgent\work\9d2a77191c8abcc1\Focal.API.sln" (2) is building "D:\BuildAgent\work\9d2a77191c8abcc1\Focal\Focal.sqlproj" (11) on node 1 (default targets). [13:42:17][MSBuild output] CoreCompile: [13:42:17][MSBuild output] C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /debug:pdbonly /optimize+ /out:obj\Release\Focal.dll /subsystemversion:6.00 /target:library /warnaserror- /utf8output "D:\BuildAgent\temp\buildTmp\.NETFramework,Version=v4.5.SqlClrAttributes.cs" [13:42:17][MSBuild output] SqlBuild: [13:42:17][MSBuild output] Creating a model to represent the project... [13:42:17][MSBuild output] Done Building Project "D:\BuildAgent\work\9d2a77191c8abcc1\Focal\Focal.sqlproj" (default targets) -- FAILED. [13:42:17][MSBuild output] Done Building Project "D:\BuildAgent\work\9d2a77191c8abcc1\Focal.API.sln" (default targets) -- FAILED. [13:42:17][MSBuild output] Done Building Project "D:\BuildAgent\work\9d2a77191c8abcc1\Focal.API.sln.teamcity" (TeamCity_Generated_Build target(s)) -- FAILED. [13:42:17][MSBuild output] [13:42:17][MSBuild output] Build FAILED.

The error is not too descriptive. I need help.

Gymkhana answered 13/6, 2017 at 21:2 Comment(0)
P
0

The error message is saying that your SqlProj failed to compile

[13:42:17][MSBuild output] SqlBuild: [13:42:17][MSBuild output] Creating a model to represent the project... [13:42:17][MSBuild output] Done Building Project "D:\BuildAgent\work\9d2a77191c8abcc1\Focal\Focal.sqlproj" (default targets) -- FAILED. There are a few reasons why this might happen, but the first thing to check is if the Sql Server Data Tools (SSDT) are installed on the build server.

If they are then check out any differnces between your "Debug" and "Release" configurations in the Visual Studio Configuration Manager

Plinth answered 14/6, 2017 at 11:54 Comment(2)
I do have the same problem but this doesn't fix it for me (I guess). I noticed that for VS2017 SSDT comes with the VS setup. The "Workload" "Data storage and processing" is installed and so is "SQL Server Data Tools" under "Individual components". I noticed on learn.microsoft.com/EN-US/sql/ssdt/… the sentence "If you are using SSDT with Visual Studio 2017, install the AS and RS components", did it. Nothing changed. SSDT is also installed separately for previous versions. Any other ideas? Btw. it builds within VS but not with MSBuild.Hydroelectric
I'm having the same issue, seems like the SSDT is not being install in the MSBuild folder, but only in the Microsoft Visual Studio folderOsculation

© 2022 - 2024 — McMap. All rights reserved.