TeamCity Cloud Cannot Start Build Runner - dotCover was not found

Answered
After the scheduled maintenance (4/17-4/19), on my Team City cloud instance, project builds that have a .NET runner (vstest) step have started failing with the following error: 
 
"Cannot start build runner"
 
In the log, the only printed information (even at diagnostics log level) is the following:
 
dotCover was not found: %teamcity.tool.JetBrains.dotCover.DotNetCliTool.bundled%\dotCover.exe
  Step Run Tests (.NET) failed with unexpected error

 

I have not changed any project settings and have tried with multiple .NET projects.

In the build configuration, I have the following build step:

  • Runner type: .NET
  • Command: vstest
  • Test Assemblies: <path to test assembly .dll>  (this is same as before when this was working)
  • Working Directory: <empty>
  • VSTest version: VSTest 2019
  • Platform: auto
  • Run In Isolation: <unchecked>
  • Tests Filtration: <disabled>
  • Framework: <empty>
  • Settings File: <empty>
  • Logging Verbosity: <diagnostic>
  • Command Line Parameters: <empty>
  • Code Coverage: JetBrains DotCover
  • dotCover CLT Home Directory: <Default (2020.2.4 Cross-Platform)>   (though I've also tried setting it to <Bundled (2020.2.4 Cross-Platform)>)
  • Run Step Within Docker Container: <empty>

 

Here's the DSL for the same:

dotnetVsTest { 
name = "Run Tests"
assemblies = "Project.UnitTests/bin/Release/Project.UnitTests.dll"
version = DotnetVsTestStep.VSTestVersion.V16
logging = DotnetVsTestStep.Verbosity.Diagnostic
coverage = dotcover {
toolPath = "%teamcity.tool.JetBrains.dotCover.CommandLineTools.DEFAULT%"
assemblyFilters = "-:Assembly.Name.Here"
}
param("platform", "auto")
}

-----

I forgot to mention, the server details:

TeamCity Cloud 2020.2.3 (build 86002)

 

2
17 comments

Hi, as a temporary workaround please try to set tool path to %teamcity.tool.JetBrains.dotCover.DotNetCliTool.2020.2.4%

 

0

Thank you -- is there a link to view the value of all the variables that are defined (and their current values) on the server/build agents?

0

Also, I've tried to set the tool path as recommended but that results in a configuration error stating that the value of needs to be defined (creates an implicit requirement that must be satisfied). I get the following when I try to run a build:

No enabled compatible agents for this build configuration.
Please register a build agent or tweak build configuration requirements.

This is the config I've tried:


dotnetVsTest { name = "Run Tests" assemblies = "Project.Tests/bin/Release/Project.Tests.dll" version = DotnetVsTestStep.VSTestVersion.V16 logging = DotnetVsTestStep.Verbosity.Diagnostic coverage = dotcover { toolPath = "%teamcity.tool.JetBrains.dotCover.DotNetCliTool.2020.2.4%" assemblyFilters = "-:Project.Tests" } param("platform", "auto") }
0

Thank you -- is there a link to view the value of all the variables that are defined (and their current values) on the server/build agents?

Yes, you need to go to the build page, then open parameters tab. Here should be all available parameters

 

0

In the UI for `dotnet test`, the tool path box isn't marked as bindable, so you can't easily get the list of defined variables; instead, you have to go to one of the other fields which are bindable to find the variable, then cut/paste it into the correct field. Maybe the tool path textbox should explicitly allow parameter binding?

0

On the build page parameters, the property for teamcity.tool.JetBrains.dotCover.DotNetCliTool.2020.2.4 does not exist (meaning it doesn't show up at all) and if I try to set the tool path to it anyway, it results in a build error, marked with an exclamation sign that needs to be fixed: it says the build configuration needs to be fixed and that I need to provide a value for this property..

On the build page parameters I do see a property defined for %teamcity.tool.JetBrains.dotCover.DotNetCliTool.bundled% but it doesn't seem to be set to anything at all (meaning it doesn't seem to have a value).

Tried explicitly setting the path to this variable but building with that results in the same error about not finding dotCover

dotCover was not found: %teamcity.tool.JetBrains.dotCover.DotNetCliTool.bundled%\dotCover.exe

Not really sure what I else I could try.

0

Please try to set the following parameter for the configuration (you can set it in the parent project as well):

teamcity.tool.JetBrains.dotCover.DotNetCliTool.bundled = %teamcity.tool.JetBrains.dotCover.DotNetCliTool.2020.2.4%
0

Thanks Sergey, I've tried setting that both as a build parameter as well as a project parameter.

In both cases, the result is the same:  build cannot start because "there are no compatible agents" and if I drill into the build config, it shows as an issue that  teamcity.tool.JetBrains.dotCover.DotNetCliTool.2020.2.4 is a parameter for which <value is required> (in red)

0

Something interesting that I found is that on the Agent Parameters page the only parameters that have anything to do with dotCover are these two: 

teamcity.dotCover.home  %teamcity.tool.JetBrains.dotCover.CommandLineTools.bundled%

and

teamcity.tool.dotCover  %teamcity.tool.JetBrains.dotCover.CommandLineTools.bundled%

 

Not sure if this is relevant or helpful, but it seems like the agent really does not have dotCover installed?!  I expected to see the full path to where dotCover was installed, like there are paths to other things like .NET framework, path to vstest, to msbuild etc.

0

Hi, the agent might not have dotCover installed by default indeed, but it could be installed "on-demand" as soon as there's a build configuration that requires it.

On my test instance I see the same warning, indeed, but it doesn't prevent the configuration from being compatible:

And if I click run, a new agent instance is started and it takes the build on arrival. 

It should work the same way for you (since all TC cloud instances are created from the same image)

0

Maybe it should, but for me it doesn't.

One aspect that is different is that I require the build on Windows whereas your build appears to be running as cross-platform.

This is a screenshot of the build I submitted after adding the parameter you suggested.

0

Do you have any other suggestions?

This has been broken since Sunday and I'm all out of ideas.

0

We are actually in process of preparing a fix for that. Hopefully, we could roll it out this weekend. Looks like there's no workaround for it in the current version

0

Sergey, were you able to get a fix? Would you be able to say when it might get deployed?

0

Are there any updates on the fix for deploying dotCover to the TCC agents?

Maybe unrelated, but as of tonight all builds are failing because "there are no agents available" and indeed, no agents show up under the build configuration.

0

Hi, I actually replied in the support channel. The fix has been deployed on Sun. Tonight, we had another mass update that caused a temporary outage

0

Thanks for the update. The builds are working again!

0

Please sign in to leave a comment.