Hello,
(note: When I wrote this post, I thought the issue was with .Net Framework 4.5.1, but before posting I downgraded xUnit from 2.0 beta to stable (1.9.2) and the problem does not exist, however, rest of the post, as well as quick fix applies still, just bear in mind that it's not about .net, but xUnit and .net 4.5.1).
I encountered an issue with Grid Node and running tests for .Net Framework 4.5.1 (and xUnit 2.0).
When I try to run tests on server, on which I do have .Net Framework 4.5.1 installed (Windows server 2008 R2, 64 bit) project will not build, however, for version 4.5 everything works fine. Furthermore, it does work locally without any problem.
I managed to fix this issue by changing Build process cpu architecture (NCrunch Configuration -> General Settings -> project -> Build process CPU architecture) to x64, instead of default x86. However, this has to be done for every 4.5.1 project, which is a bit cumbersome.
Error that I receive when trying to run tests on Grid Node without changing architecture (removed unnecessary lines):
Quote:
NCrunch: The build results for this project are not consistent across all computers within the grid.
This project was successfully built on computers: (local)
This project failed to build on computers: VM1
Relevant tests will continue to run on computers that are able to build this project successfully. Please ensure all computers within the grid are configured correctly with all required SDKs installed.
****************** BUILD OUTPUT FROM '(local)' ******************
****************** BUILD OUTPUT FROM 'VM1' ******************
Class1.cs (13): The type 'System.Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Class1.cs (12): 'Xunit.FactAttribute' is not an attribute class
NCrunch: The following files are expected but do not seem to exist on the computer responsible for building this project:
[...]
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Microsoft.CSharp.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\mscorlib.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Core.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Data.DataSetExtensions.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Data.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.dll
[...]
Please make sure you have all SDKs required to build this project installed on this computer.
What is interesting, is that although I do have 4.5.1 installed, I don't have this directory in program files (I have 4.5 though), on my dev machine this directory exists. I tried reinstalling framework 4.5.1 and rebooting the server, didn't help.
I tested this on almost empty project, without any dependencies (only xUnit, which is downloaded from nuget).