JetBrains / teamcity-dotnet-plugin

TeamCity plugin for .NET projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TC 2017.2.2 failing to build .Net Core 1.0 projects

jimasp opened this issue · comments

We've recently upgraded to TeamCity 2017.2.2

All builds using .Net Core 2.0 work fine, but we have TC some projects that use .Net Core 1.0 (specifically 1.0.0-preview2-003133 SDK).

These TC projects fail to build like this:

Step 4/12: Restore (.NET CLI (dotnet))
[11:10:27] [Step 4/12] dotnet.exe restore --source https://www.nuget.org/api/v2/ @C:\BuildAgent\temp\agentTmp\5ff2e6f6e75e400d8597def4ed08ab13.rsp
[11:10:27] [Step 4/12] restore
[11:10:27] [restore] Starting: "C:\Program Files\dotnet\dotnet.exe" restore --source https://www.nuget.org/api/v2/ @C:\BuildAgent\temp\agentTmp\5ff2e6f6e75e400d8597def4ed08ab13.rsp
[11:10:27] [restore] in directory: C:\BuildAgent\work\d2f2d03ae54141
[11:10:27] [restore] error: @C:\BuildAgent\temp\agentTmp\5ff2e6f6e75e400d8597def4ed08ab13.rsp
[11:10:27] [restore] Process exited with code 1

The problem is that the .NET CLI (dotnet) adds the .rsp file to the command line, and this makes the dotnet command fail (this happens with any dotnet command for a .net core 1.0 project, e.g. dotnet restore, dotnet build, dotnet test, etc.)

This issue is the same problem I think:
#116

So following the advice in that issue, I set the dotnet.cli.rsp = false
i.e. I added the configuration parameter dotnet.cli.rsp to /admin/editBuildParams.html and set its value to false.

But, when I run the build it is not removing the .rsp file from the command. The configuration parameter is just ignored.

Consequently the only workaround is to ditch the .NET CLI runner, and manually enter a command line for each dotnet call.

@jimasp
unfortunately TeamCity 2017.2.2 does not contain fix, so upgrade it to 2017.2.3 or update just plugin downloading it from this url

I'm running Teamcity 2018.2 trying to restore a .NET Core 1.0 and I had to use dotnet.cli.rsp=false following what was said in #116. But now I'm encountering the following error:
[restore] error: /p:VSTestLogger=logger%3A%2F%2Fteamcity
[restore] Process exited with code 1
[restore] Step .NET Core (dotnet) restore (.NET CLI (dotnet)) failed

It will be fixed in 2019.2.1. It will be possible to override any parameters via command line field