Hi,
I only purchased NCrunch yesterday so please be gentle! I have installed the VS2015 Ultimate Preview and was keen to try the 'smart unit tests' to pin down some code and avoid regressions during a change I need to make.
I followed the following steps to test the Smart Unit tests, but have then enabled NCrunch and get the errors shown:
1) Create class library project.
2) Create a nonsense class with a few conditionalities to see what tests it whips up:
public string IsItGood(string input)
{
if (input == null) return "its bad";
if (input == "good") return "it's good";
if (input.Contains("oo")) return "It has an oo in it, and is good";
if (input.StartsWith("a")) return "It starts with a and is good";
return "its bad";
}
public string IsItReallyGood(string input)
{
if (input == "really good") return "it's really good";
return "its not really good, but may be good";
}
}
3) Right click the class title and select 'smart unit tests'. Highlight them in the new panel and click the disk to 'save' them into a test project.
4) Running these in the internal test runner works fine.
In NCrunch however it says "1 Project is failing to build" and I get the following issues. The assembly refs are there, so I'm not sure if I'm doing something silly or if this just isn't yet supported. I figure it may be to do with absolute paths and the 'ghost copy' not having certain dependencies. Any tips appreciated.
NCrunch: If you are experiencing problems in getting this project to build, have a look at
http://www.ncrunch.net/d...ng_project-build-issues
Properties\PexAssemblyInfo.cs (8): The type or namespace name 'PexAssemblySettings' could not be found (are you missing a using directive or an assembly reference?)
Properties\PexAssemblyInfo.cs (11): The type or namespace name 'PexAssemblyUnderTest' could not be found (are you missing a using directive or an assembly reference?)
Properties\PexAssemblyInfo.cs (14): The type or namespace name 'PexCreatableFactoryForDelegates' could not be found (are you missing a using directive or an assembly reference?)
Properties\PexAssemblyInfo.cs (17): The type or namespace name 'PexAllowedContractRequiresFailureAtTypeUnderTestSurface' could not be found (are you missing a using directive or an assembly reference?)
Properties\PexAssemblyInfo.cs (18): The type or namespace name 'PexAllowedXmlDocumentedException' could not be found (are you missing a using directive or an assembly reference?)
Properties\PexAssemblyInfo.cs (8): The type or namespace name 'TestFramework' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.cs (4): The type or namespace name 'Pex' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Class1Test.cs (5): The type or namespace name 'Pex' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Class1Test.IsItGood.g.cs (1): The type or namespace name 'Pex' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Class1Test.IsItReallyGood.g.cs (1): The type or namespace name 'Pex' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Properties\PexAssemblyInfo.cs (2): The type or namespace name 'Pex' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Properties\PexAssemblyInfo.cs (3): The type or namespace name 'Pex' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Properties\PexAssemblyInfo.cs (4): The type or namespace name 'Pex' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Properties\PexAssemblyInfo.cs (5): The type or namespace name 'Pex' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Class1Test.cs (12): The type or namespace name 'PexClass' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.cs (13): The type or namespace name 'PexAllowedExceptionFromTypeUnderTest' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.cs (14): The type or namespace name 'PexAllowedExceptionFromTypeUnderTest' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.cs (13): The type or namespace name 'AcceptExceptionSubtypes' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.cs (17): The type or namespace name 'PexMethod' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.cs (18): The type or namespace name 'PexAssumeUnderTest' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.cs (24): The type or namespace name 'PexMethod' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.cs (25): The type or namespace name 'PexAssumeUnderTest' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.IsItGood.g.cs (18): The type or namespace name 'PexGeneratedBy' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.IsItGood.g.cs (28): The type or namespace name 'PexGeneratedBy' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.IsItGood.g.cs (38): The type or namespace name 'PexGeneratedBy' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.IsItGood.g.cs (48): The type or namespace name 'PexGeneratedBy' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.IsItGood.g.cs (58): The type or namespace name 'PexGeneratedBy' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.IsItGood.g.cs (68): The type or namespace name 'PexGeneratedBy' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.IsItGood.g.cs (78): The type or namespace name 'PexGeneratedBy' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.IsItReallyGood.g.cs (18): The type or namespace name 'PexGeneratedBy' could not be found (are you missing a using directive or an assembly reference?)
Class1Test.IsItReallyGood.g.cs (28): The type or namespace name 'PexGeneratedBy' could not be found (are you missing a using directive or an assembly reference?)
WARNING - ..\..\..\..\..\..\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets (1811): Could not resolve this reference. Could not locate the assembly "Microsoft.Pex.Framework". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.