# Running Unit Tests with Visual Studio 2017

**URL:** <https://www.finalbuilder.com/forums/t/running-unit-tests-with-visual-studio-2017/6103>\
**Category:** Bugs\
**Created:** [February 20, 2018, 3:06am UTC](https://www.finalbuilder.com/forums/t/running-unit-tests-with-visual-studio-2017/6103 "2018-02-20T03:06:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sa\_thomaslohrum](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sa\_thomaslohrum](https://www.finalbuilder.com/forums/u/sa_thomaslohrum)\
**Post date:** [February 20, 2018, 3:06am UTC](https://www.finalbuilder.com/forums/t/running-unit-tests-with-visual-studio-2017/6103/1 "2018-02-20T03:06:15Z")

</div>

Hi,  
  
running on CI 1.8.1.739 we encounter an issue after upgrading from VS 2015 to VS 2017.  
  
Our build does include unit tests which fail with&nbsp; this error:  
[Error] An error occurred while parsing unit test output. VSTest.Console did not produce a trx report file.  
  
Running on VS 2015

Microsoft ®-Testausfhrungs-Befehlszeilentool Version 14.0.25420.1  
  
16:41:08&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Erfolgreich&nbsp;&nbsp; TestNullIf  
16:41:08&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ergebnisdatei: D:\ContinuaCI\CI\_WS\Ws\12206\TestResults\finalbuilder\_XXXX 2018-02-20 16\_41\_07.trx  
16:41:08&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  
16:41:08&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gesamtanzahl von Tests: 14. Erfolgreich: 14. Fehlgeschlagen: 0. šbersprungen: 0.  
16:41:08&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Testlauf erfolgreich.  
16:41:08&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Testausfhrungszeit: 1,3215 Sekunden  
16:41:08&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VSTest results: Fixtures: 2, Tests: 14, Passes: 14, Failures: 0, Errors: 0, Inconclusive: 0, Ignored: 0, Skipped: 0, Invalid: 0, Not Run: 0

This run’s fine.  
  
  
Running on VS 2017  
  

Microsoft ® Testausfhrungs-Befehlszeilentool Version 15.5.0

16:30:27&nbsp; &nbsp;&nbsp;&nb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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Testausfhrungszeit: 2,1118 Sekunden  
16:30:27&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Ergebnisdatei: D:\ContinuaCI\CI\_WS\Ws\12205\TestResults\finalbuilder\_XXXX\_2018-02-20\_16\_30\_26.trx**  
16:30:27&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Error] An error occurred while parsing unit test output. VSTest.Console did not produce a trx report file.

This fails obviously. However, the file does exist!  
  
Your help is appreciated.  
  
Thomas

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [February 20, 2018, 9:21am UTC](https://www.finalbuilder.com/forums/t/running-unit-tests-with-visual-studio-2017/6103/2 "2018-02-20T09:21:28Z")

</div>

Hi   
  
 It looks like an issue with the regex used to determine the trx path, can you send the unobfuscated log text to support @ [finalbuilder.com](http://finalbuilder.com) so we can test with it here.

---

<div class="post-metadata">

**Author:** ![sa\_thomaslohrum](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sa\_thomaslohrum](https://www.finalbuilder.com/forums/u/sa_thomaslohrum)\
**Post date:** [February 26, 2018, 3:21am UTC](https://www.finalbuilder.com/forums/t/running-unit-tests-with-visual-studio-2017/6103/3 "2018-02-26T03:21:44Z")

</div>

Hi,  
  
i’ve just sent the log to you.  
  
Thomas

---

<div class="post-metadata">

**Author:** ![sa\_thomaslohrum](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sa\_thomaslohrum](https://www.finalbuilder.com/forums/u/sa_thomaslohrum)\
**Post date:** [March 1, 2018, 9:00am UTC](https://www.finalbuilder.com/forums/t/running-unit-tests-with-visual-studio-2017/6103/4 "2018-03-01T09:00:44Z")

</div>

I confirm the issue is fixed with&nbsp;1.8.1.759.  
  
Thanks a lot for providing a fix so quick!  
  
Thomas
