Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CI Build Error with Visual Studio Test step after .Net 4.6 upgrade - Executor process exited; There was no endpoint listening at net.pipe

I just upgraded all of the projects in my solution to point to .Net 4.6 (There is a web app, some class libraries, a database project, etc.). I have a CI build set up in Visual Studio Team Services (using the new build system, not XAML) which was building successfully prior to the upgrade. This build definition runs Debug, Staging, and Production builds and the build definition is comprised of two steps:

  • Visual Studio Build
  • Visual Studio Test

Prior to this framework upgrade, everything was building fine. I upgraded and built everything locally and it all worked great too. I could run the tests and got green across the board. Now, when I checked my code in it kicked off the CI build, and I got the following error/s on the "Visual Studio Test" step (taken from the logs):

2015-09-18T19:08:02.1212067Z Microsoft (R) Test Execution Command Line Tool Version 14.0.23107.0
2015-09-18T19:08:02.1489666Z Copyright (c) Microsoft Corporation.  All rights reserved.
2015-09-18T19:08:02.8906952Z Starting test execution, please wait...
2015-09-18T19:08:03.3713251Z Warning: Using Isolation mode to run tests as required by effective Platform:X86 and .Net Framework:Framework35 settings for test run. Use the /inIsolation parameter to suppress this warning.
2015-09-18T19:08:07.4457804Z ##[error]Error: Executor process exited.
2015-09-18T19:08:07.4457804Z ##[error]
2015-09-18T19:08:07.4557251Z ##[error]Error: There was no endpoint listening at net.pipe:[...redacted...] that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
2015-09-18T19:08:07.4557251Z ##[error]
2015-09-18T19:08:07.7730938Z ##[error]VSTest Test Run failed with exit code: 1
2015-09-18T19:08:07.8043435Z ##[warning]No results found to publish.

The Visual Studio Build passes for all three configurations, and the Test step only fails for Debug because it cannot find any tests for the other two configurations. Additionally, my builds are running off of an Azure VM that I stood up to act as a build server, and when I run the CI build using the Hosted build controller the Test step passes, because it cannot find any tests to execute, but the warning about using 'Isolation mode to run tests...' is still printed out in the log.

Is this a known issue? Has anyone else encountered this after a 4.6 upgrade or in another context in VSTS?

Edit: the .Net Framework 4.6 SDK and targeting pack/s ARE installed on the build machine: From 'Programs and Features' on build server

like image 937
How 'bout a Fresca Avatar asked Dec 05 '22 20:12

How 'bout a Fresca


2 Answers

The first warning suggests that the tests are running on .NET 3.5:Warning: ... effective Platform:X86 and .Net Framework:Framework35 ...

So I explicitly set the vstest.console framework version to 4.5. (At this time 4.6 is not an available option). That resolved these symptoms for me.

To do so edit the Visual Studio Test build step. On the Build tab of the step settings, expand the Advanced section, and set Other console options to /Framework:Framework45.

Other console options: /Framework:Framework45

like image 99
Jacob Foshee Avatar answered Feb 07 '23 11:02

Jacob Foshee


I found a workaround for the time being that works for now. I modified the settings for the Visual Studio Test build step as follows:

On the Build tab of the step settings, expand the "Advanced" section, and change the VSTest version to "Visual Studio 2013".

That's all it took for me. I tried this because my build was working when I switched to the Hosted build controller, and this was one of the differences between the two in the logs. This is the only thing that I changed, and it worked. I have no idea WHY the Visual Studio 2015 VSTest version doesn't work, but will look into it more and add to this if I find anything...

like image 38
How 'bout a Fresca Avatar answered Feb 07 '23 10:02

How 'bout a Fresca