JetBrains / TeamCity.VSTest.TestAdapter

Apache License 2.0
30 stars 14 forks source link

TeamCity.VSTest.TestLogger not showing up when running vstest.console /ListLoggers #29

Open onkeld0m opened 5 years ago

onkeld0m commented 5 years ago

Hey team,

I'm having a bit of trouble getting the TeamCity logger running under VS 2017 patchlevel 15.9.3. The installation for VS 2013 is running smoothly though.

I followed the installation notes and put the 4 files found in the downloaded .zip file (under folder vstest15) in the following folder on the build machines local drive:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\TestPlatform\Extensions

When running vstest.console /ListLoggers, TeamCity logger is not listed as installed.

Any ideas on this issue?

Cheers, Dom

NikolayPianikov commented 5 years ago

Hi

I'm trying to reproduce the problem, could you correct me what I'm doing wrong:

Is is important to mention that Visual Studio contains several versions of vstest.console for instance:

and each of them might have own set of extensions

onkeld0m commented 5 years ago

I just double checked everything and here is what I did (yesterday):

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\TestPlatform>vstest.console /listloggers Microsoft (R) Test Execution Command Line Tool Version 15.9.0 Copyright (c) Microsoft Corporation. All rights reserved.

The following Test Logger Add-Ins are available: Microsoft.TestPlatform.Extensions.BlameDataCollector.BlameLogger Uri: logger://Microsoft/TestPlatform/Extensions/Blame/v1 FriendlyName: Blame Microsoft.VisualStudio.TestPlatform.Extensions.TrxLogger.TrxLogger Uri: logger://Microsoft/TestPlatform/TrxLogger/v1 FriendlyName: Trx

NikolayPianikov commented 5 years ago

Could you add another one argument /Diag:log.txt, so the final command line looks like: vstest.console.exe /ListLogger /Diag:log.txt and attach log.txt please

onkeld0m commented 5 years ago

log.txt

Looks like we've got some dependecy missing on our system. Could you point me to the right direction here?

NikolayPianikov commented 5 years ago

As workaround try using assemblies from vstest14, I will try to reproduce this issue at first

onkeld0m commented 5 years ago

Awesome! That did the trick. Now the TeamCity logger is shown.

onkeld0m commented 5 years ago

Just a quick question of topic:

was the friendly name changed at some point in time (maybe coming from VS2012 going to VS2013 or even later)?

NikolayPianikov commented 5 years ago

@onkeld0m, the case of friendly name was changed some times ago, but the corresponding change has been done in TeamCity to support it. Any troubles with it?

NikolayPianikov commented 5 years ago

Which version of Visual Studio are you using now? Did you just install this version or updated it from some previous version of VS 2017?

onkeld0m commented 5 years ago

I've constantly updated it. I think I've started with 15.7.x or may an even older patch level.

NikolayPianikov commented 5 years ago

How many windows TeamCity agents do you have and how many of them have the same problem? I had several experiments: latest Windows 10 from the scratch and latest VS 2017 Professional with different sets of installed features, but still can't reproduce this issue. The most simple way to find why vstest cannot find required dependencies is to use FusionLog (Fuslogvw.exe). To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Fuslogvw.exe can be finded in the directory like C:\Program Files (x86)\Microsoft SDKs\Windows\vXXX\bin\NETFX XXX Tools\FUSLOGVW.exe I could compare our logs and find any differences. I've found a several posts why it might happened, but they look like unlikely.