.NET CLI (dotnet) "It was not possible to find any compatible framework version" after TC update


We are experiencing this error message in builds using the .NET CLI (dotnet) runner. This started right after we updated Teamcity yesterday.

This is the error message from the log

[build] Starting: "C:\Program Files\dotnet\dotnet.exe" build Solutions\Generated\Api\Api.sln --framework 2.1.5 --configuration Release @F:\ba2\temp\agentTmp\1.rsp
[build] in directory: F:\ba2\work\6716838d5c881788
[build] Microsoft (R) Build Engine version 16.0.450+ga8dc7f1d34 for .NET Core
[build] Copyright (C) Microsoft Corporation. All rights reserved.
[build] It was not possible to find any compatible framework version
[build] The specified framework 'Microsoft.NETCore.App', version '1.0.5' was not found.
[build] - Check application dependencies and target a framework version installed at:
[build] C:\Program Files\dotnet\
[build] - Installing .NET Core prerequisites might help resolve this problem:
[build] https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
[build] - The .NET Core framework and SDK can be installed from:
[build] https://aka.ms/dotnet-download
[build] - The following versions are installed:
[build] 2.1.6 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
[build] 2.2.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
[build] 2.2.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

We've tried to run the step with the target framework switch, but it still fails. Now to me it looks like it looks like the .NET CLI runner is defaulting framework version to 1.0.5.

The same command runs ok in the same checkout folfer on the agent. We've also created a similar powershell step and it runs the build ok.

We are running the latest Teamcity version 2018.2.4 (build 61678)


Hi Jose,

Which framework versions are specified inside your project file in `<TargetFramework>...</TargetFramework>`?
Also, I can see you are specifying `--framework 2.1.5` as a dotnet.exe parameter, but 2.1.5 does not look like a valid framework version to me. Please refer to this document for the list of framework versions.

If you need to specify the SDK version that should be done in the global.json file. By default, dotnet CLI will try to build your solution using the latest installed version of SDK. If dotnet CLI tries to build your solution using a certain version of SDK it could mean that there is already a global.json file in which that version is specified.



The same experience :(

1.0.5 comes from nowhere. Until the Teamcity upgrade, everything was fine.

If I execute the same commands on the agents, then everything looks good.

dotnet restore
dotnet build
dotnet test

Are failing with some projects in solution. Don't see any pattern here at the moment.


We're running into this too. Our csproj files are targeting netcoreapp2.2 and the build agents have this version installed. Where dotnet core 1.0.5 is coming from is a complete mystery.

<Project Sdk="Microsoft.NET.Sdk.Web">


Same issue happened to us.


<Project Sdk="Microsoft.NET.Sdk">



Hi all,


this issue has been now fixed: https://youtrack.jetbrains.com/issue/TW-59974. Please check the issue in the tracker, there is a fixed version of the plugin for 2018.2.4 on the issue that you can replace the bundled one with to fix it in your installation, and the fix should be carried over to the next release as well.


odd then that I am seeing this now having just upgraded to TeamCity Professional 2020.2.3 (build 86002). We have been using TFS for CLI builds so this is a new path for us. I know this issue is years old, I still need help


Please sign in to leave a comment.