Hi,
I'm running into some weird issues when building my projects on an ncrunch server node.
My solution is configured for AnyCpu (for all projects)
My dev. machine is Win8.1 x64 pro, locally everything works fine.
The server node is a Win8.1 x86 machine. I installed VS2013 and all required SDKs on it (specifically Code Contracts in my case).
Now when that server node builds any project, it seems to build and run my tests, but in the NCrunch Test window I get a whole bunch of errors/warnings stating:
Quote:NCrunch: The following files are expected but do not seem to exist on the computer responsible for building this project:
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.CSharp.targets
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.CSharp.CurrentVersion.targets
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.targets
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets
C:\Program Files (x86)\MSBuild\12.0\Microsoft.Common.props
[.....tons more......]
Please make sure you have all SDKs required to build this project installed on this computer.
I have no idea why it wants to look in the x86 folder which doesn't exist on an x86 machine. Is that somehow synced over from the client?
The interesting thing is, it still seems to build and run my tests.
Here's what's more interesting, if in the NCrunch options I select x64, it still builds and the errors/warnings go away (I think then it just looks into Program Files because it thinks it's on an x64 machine and that's where x64 stuff resides).
Also, when I create a symlink (manually) on the server that points from C:\Program Files (x86) to C:\Program Files the warnings go away too (back to x86 config in nCrunch for that project)
Despite the fact that it still seems to work (....somehow....), this is bothering me for two reasons:
First, I don't like warnings/errors.
And second, more importantly I have some tests that check CC thrown exception (ArgumentExceptions) and to ensure I'm not catching some other weird exception I check the Exception refers to the expected parameter.
I think the output assembly is somehow marked as x64, and CC is super confused when build in this manner and mangles up strings.
The Param property of the exception is suddenly null, and the Message property looks something like this:
Quote:System.ArgumentException: "Precondition failed: s t r i n g u s e r N"
instead of
Quote:System.ArgumentException: Precondition failed: !string.IsNullOrWhiteSpace(userName)
The whitespace in there is \0
This makes my tests fail when run on that server node.
I don't expect you to fix some weird CC rewriter issue, but I think the root problem is just that NCrunch on that server node somehow thinks its on an x64 machine and compiles things in a weird way. To be clear, everything seems to work perfectly locally (unfortunatly I don't have an x64 server that I could try this on).
Any advice?
Edit: I forgot to mention I can repro this with an fresh solution/project (and without using any CC)
I still get all the warnings. I saved a detailed log from the node if you need it.