My team has been running into this issue quite a bit lately, and it is blocking a lot of them from getting their Unit Tests running reliably. I'm not sure if it is caused by our recent upgrade to VS2015 or the latest version of NCrunch or what.
The error we see is something like this:
Quote:CSC (0, 0): Error signing output with public key from file 'C:\AnotherLocation\MyKey.snk' -- The directory name is invalid
When I enable NCrunch's "Detailed" logging, I see something like the following in the logs:
Quote:....
Writing new workspace member C:\NCrunch\29976\61\AnotherLocation\MyKey.snk (version 1)
....
C:\Program Files (x86)\MSBuild\14.0\bin\amd64\csc.exe /noconfig /checked+ /nowarn:1570,1573,1581,1584,1685,1607,1701,1702,2008 /nostdlib+ /warn:4 /define:NCRUNCH;PLATFORM_x64;DEBUG /errorendlocation /preferreduilang:en-US /highentropyva- /reference:C:\NCrunch\29976\61\_ncrunchreferences\System.Xml.dll /debug+ /debug:full /keyfile:C:\AnotherLocation\MyKey.snk /nologo /optimize- /out:C:\NCrunch\29976\61\Office\Build\x64\debug\MyLibrary.dll /subsystemversion:6.00 /target:library /warnaserror- MyCode.cs
Error signing output with public key from file 'C:\AnotherLocation\MyKey.snk' -- The directory name is invalid.
My guess is that the issue stems from the fact that /keyfile is using the original location instead of the location inside the NCrunch workspace. And perhaps there is something within NCrunch that doesn't like the fact that it is using something from outside of the workspace.. ?
It builds fine in VS and on the command line. And yes, I'm aware of the option to turn signing off, however that doesn't work for us. Is this a bug with NCrunch itself?