4

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

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
How 'bout a Fresca
  • 2,267
  • 1
  • 15
  • 26
  • If you set Azure VM as the build server machine, then all builds and tests are executed on that VM. So, you should be sure that test can be run successfully directly on VM (not via build process). Additionally, the error message shown above is always caused when some traffics are blocked by the firewall, so have a check of the firewall settings on that Azure VM. – Vicky - MSFT Sep 21 '15 at 02:30
  • I ran all of the tests via Visual Studio 2015 on the Azure VM (build server) successfully and am still experiencing the error above when running the test task via VSO. As far as firewall settings, how could a project update to .Net 4.6 affect this? Nothing with the firewall has changed. Thanks! – How 'bout a Fresca Sep 21 '15 at 13:57
  • Are you using a .runsettings file? – Jacob Foshee Sep 28 '15 at 17:32

4 Answers4

13

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

Jacob Foshee
  • 2,704
  • 2
  • 29
  • 48
  • 2
    Working, but still no Framework46 option as of this comment, using TFS 2015 Update 1. .NET 4.6 assemblies should still use Framework45 for this manual option. – Brendan Hannemann Dec 21 '15 at 21:39
2

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...

How 'bout a Fresca
  • 2,267
  • 1
  • 15
  • 26
0

I experienced this error (specifically the VSTest exit code) after upgrading a test project to 4.6.1. The issue was that the packages.config didn't update the test framework runner pacakge correctly leaving it at .Net 3.5. Updating the target framework resolved the problem.

Lex
  • 658
  • 4
  • 17
0

After installing .Net Framework 3.5 feature everything was OK! See "cottsay" comment at https://github.com/Microsoft/vsts-tasks/issues/572

Luuk Krijnen
  • 1,180
  • 3
  • 14
  • 37