TeamCity no longer building after dotnet version upgrade

Answered

I have TeamCity installed on a Debian 11 server, and today after doing an upgrade on the two dotnet SDKs installed on it (3.1.420 and 6.0.301), a basic build step is now no longer working.

The log is spitting out the following:

[21:28:18]E: Step 1/14: Publish (.NET)
[21:28:18]i:     [Step 1/14] dotnet --version
[21:28:18]i:     [Step 1/14] Starting:  Getting the .NET SDK version /usr/share/dotnet/ dotnet  --version
[21:28:18]i:     [Step 1/14] in directory:  /opt/teamcity-agent-1/work/eddc24f5d5a9ddc4
[21:28:18]i:     [Step 1/14] 6.0.301
[21:28:18]i:     [Step 1/14] Process exited with code 0
[21:28:18]E:     [Step 1/14] dotnet publish
[21:28:18] :         [dotnet publish] Starting:  [30;1m.NET SDK 6.0.301  [0m/usr/share/dotnet/dotnet publish /opt/teamcity-agent-1/work/eddc24f5d5a9ddc4/Src/XXXXX.sln --configuration Release --output output/ @/opt/teamcity-agent-1/temp/agentTmp/1.rsp -p:PackageVersion=1.0.1767 -p:OutputPath=output/ -p:PublishDir=output/
[21:28:18] :         [dotnet publish] in directory: /opt/teamcity-agent-1/work/eddc24f5d5a9ddc4
[21:28:18] :         [dotnet publish] Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET
[21:28:18] :         [dotnet publish] Copyright (C) Microsoft Corporation. All rights reserved.
[21:28:18] :         [dotnet publish] 
[21:28:18] :         [dotnet publish] MSBUILD : error MSB1006: Property is not valid.
[21:28:18] :         [dotnet publish] Switch: /opt/teamcity-agent-1/plugins/dotnet/tools/vstest15
[21:28:18] :         [dotnet publish] 
[21:28:18] :         [dotnet publish] For switch syntax, type "MSBuild -help"
[21:28:18]W:         [dotnet publish] Process exited with code 1
[21:28:18]E:         [dotnet publish] Process exited with code 1 (Step: Publish (.NET))

I've taken a look at the contents of /opt/teamcity-agent-1/temp/agentTmp/1.rsp which are auto-generated by TeamCity and I can see the following line:

-p:VSTestTestAdapterPath=".;/opt/teamcity-agent-1/plugins/dotnet/tools/vstest15"

If I remove the ".;" to make it:

-p:VSTestTestAdapterPath="/opt/teamcity-agent-1/plugins/dotnet/tools/vstest15"

And then try and execute the command line above directly from bash, it works ok, but next build on teamcity the 1.rsp file gets re-generated and again fails.

Is this a known issue? Is there a workaround for this other than to roll back to the dotnet SDKs?

 

Alvaro

 

 

2
5 comments

I can see this may be affecting other people too by the posting made over at the github repo for the teamcity-dotnet-plugin: https://github.com/JetBrains/teamcity-dotnet-plugin/issues/158

0

We have the same problem after upgrading Visual Studio to version 17.2.4 and .NET 6.0.6 (SDK 6.0.301). 

0

As noted in this post https://github.com/JetBrains/teamcity-dotnet-plugin/issues/158#issuecomment-1157370284 - the issue can be resolved by upgrading the dotnet plugin within TeamCity.

0

We have the same problem after .NET 6.0.301 was installed

0

Please sign in to leave a comment.