vstestconsole.exe: Data collection : Unable to find a datacollector with friendly name 'CatchEventsCollector'

149 views Asked by At

I'm using a custom Datacollector for vstestconsole.exe (Version 14.0.25420.1) on a Windows Server 2012 R2 Standard and it works perfectly. After migrating to Windows Server 2019 and vstestconsole.exe (Version 16.11.0) I still execute the same command:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow>vstest.console.exe C:\VS\FFBE\020_Test\FW\Ffbe.Test\TestKonsole\bin\Debug\MyTest.dll                                                                                                                                                          /logger:trx                                     
/Settings:C:\VS\Settings.runsettings                                     
/tests:TF01_G,
/Diag:E:\Temp\log.txt

And I keep on getting the following error: Data collection : Unable to find a datacollector with friendly name 'CatchEventsCollector'. Data collection : Could not find data collector 'CatchEventsCollector'

My runsettings-file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
  <MSTest>
    <DeleteDeploymentDirectoryAfterTestRunIsComplete>false</DeleteDeploymentDirectoryAfterTestRunIsComplete>
  </MSTest>
  <RunConfiguration>
    <ResultsDirectory>e:\test\Framework</ResultsDirectory>
  </RunConfiguration>
  <DataCollectionRunSettings>
    <DataCollectors>
      <DataCollector friendlyName="CatchEventsCollector" uri="datacollector://TestCompany/FfbeTestFramework/1.0" assemblyQualifiedName="Datacollector.CatchEventsCollector, Datacollector, Version=1.0.0.0, Culture=neutral" />
    </DataCollectors>
  </DataCollectionRunSettings>
</RunSettings>

If I replace my custom-Datacollector in the runsettings e.g. with the onboard-VideoRecorder-Datacollector (), vsTestconsole is able to find the collector.

I named my custom-Datacollector Datacollector.dll and implemented following the official MS-instructions: Implementing a custom Data Collector

I placed my Datacollector.dll in the folder 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions'. According to the vstestconsole-diagnostics-log it is being found and loaded:

TpTrace Verbose: 0 : 15416, 8, 2023/01/18, 18:41:25.902, 4593946638372, testhost.net48.x86.exe, TcpClientExtensions.MessageLoopAsync: NotifyDataAvailable remoteEndPoint: 127.0.0.1:8265 localEndPoint: 127.0.0.1:8266
TpTrace Information: 0 : 15416, 8, 2023/01/18, 18:41:25.906, 4593946674455, testhost.net48.x86.exe, TestRequestHandler.OnMessageReceived: received message: (TestExecution.Initialize) -> [
  "C:\\VS\\FFBE\\020_Test\\FW\\Ffbe.Test\\TestKonsole\\bin\\Debug\\NUnit3.TestAdapter.dll",
  "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\IDE\\Extensions\\TestPlatform\\Extensions\\Datacollector.dll",
  "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\IDE\\Extensions\\TestPlatform\\Extensions\\Microsoft.Cci.dll",

Still I keep getting the error that a data Collector with the friendlyName 'CatchEventsCollector' can not be found. I'm stuck on this issue for a week now. I'd appreciate any hint. Thank you in advance

0

There are 0 answers