coverlet: Upgrading to 3.0.0 causes System.MissingMethodException: Method not found: 'Boolean Microsoft.VisualStudio.TestPlatform.CoreUtilities.Helpers.CommandLineArgumentsHelper.TryGetIntArgFromDict

My service is built using Azure DevOps:

Current agent version: '2.175.2'

If I upgrade to version 3.0.0 my tests fail with error:

Starting: Running tests from ResourceProviderService.Tests.Functional
==============================================================================
Task         : .NET Core
Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command
Version      : 2.179.2
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
==============================================================================
C:\windows\system32\chcp.com 65001
Active code page: 65001
Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you're using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version.
C:\dotnet\dotnet.exe test C:\azagent\_work\1\a\Service.Tests.Functional\Service.Tests.Functional.dll --logger trx --results-directory C:\azagent\_work\_temp --settings C:\azagent\_work\1\a/Service.Tests.Functional/RunSettings/FunctionalTests.Dev.RunSettings
Microsoft (R) Test Execution Command Line Tool Version 16.7.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
Testhost process exited with error: Unhandled exception. System.MissingMethodException: Method not found: 'Boolean Microsoft.VisualStudio.TestPlatform.CoreUtilities.Helpers.CommandLineArgumentsHelper.TryGetIntArgFromDict(System.Collections.Generic.IDictionary`2<System.String,System.String>, System.String, Int32 ByRef)'.
   at Microsoft.VisualStudio.TestPlatform.TestHost.DefaultEngineInvoker.SetParentProcessExitCallback(IDictionary`2 argsDictionary)
   at Microsoft.VisualStudio.TestPlatform.TestHost.DefaultEngineInvoker.Invoke(IDictionary`2 argsDictionary)
   at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Run(String[] args)
   at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(String[] args)
. Please check the diagnostic logs for more information.
Results File: C:\azagent\_work\_temp\testagent000000$_testagent000000_2021-01-12_19_59_37.trx

Rolling back to 1.3.0 makes the issue to disappear.

Other installed packages:

<ItemGroup>
  <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
  <PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
  <PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
  <PackageReference Include="coverlet.collector" Version="1.3.0">
    <PrivateAssets>all</PrivateAssets>
    <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
  </PackageReference>
</ItemGroup>

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 35

Commits related to this issue

Most upvoted comments

Cool thanks for the help. 😄 👍 @MarcoRossignoli We probably should update the docs how to consume the nightly or highlight the note at the end.

Cool we can try to merge on nightly and ask guys to give it a try!

OK I’m a bit confused now. I can’t get it running on netcoreapp2.0. But I also can’t get the coverlet.collector v1.3.0 running on netcoreapp2.0 target framework. In the documentation (doc) it says min .NET Core SDK v2.2.401?

As for the Microsoft.NET.Test.Sdk the min version in our documentation (16.5.0) is working. I still have to test full framework.

@fredrikcarlbom @abatishchev can you try with this preview version?

Preview.zip