I have an interesting problem:
The anaylsis in NCrunch fails with the following error:
Quote:
[14:46:51.6461-AnalysisTask-62] ERROR (Analysis): A failure occurred while analysing the assembly [SnapshotComponent: GA.CoreData.IntegrationTests, 12, 37663886]: System.InvalidCastException: Specified cast is not valid.
at Ploeh.AutoFixture.SpecimenFactory.CreateAnonymous[T](ISpecimenContext context, T seed)
at Ploeh.AutoFixture.SpecimenFactory.CreateAnonymous[T](ISpecimenContext context)
at GA.CoreData.IntegrationTests.CoreDataCustomization.AnonymousCreationCustomization.<Customize>b__a(ICustomizationComposer`1 c) in C:\Data\Projects\GlobaleAdministration\Main\Source\GA.CoreData.IntegrationTests\TestFoundation\CoreDataCustomization.cs:line 44
at Ploeh.AutoFixture.Fixture.Customize[T](Func`2 composerTransformation)
at GA.CoreData.IntegrationTests.CoreDataCustomization.AnonymousCreationCustomization.Customize(IFixture fixture) in C:\Data\Projects\GlobaleAdministration\Main\Source\GA.CoreData.IntegrationTests\TestFoundation\CoreDataCustomization.cs:line 43
at Ploeh.AutoFixture.CompositeCustomization.Customize(IFixture fixture)
at Ploeh.AutoFixture.Fixture.Customize(ICustomization customization)
at GA.CoreData.IntegrationTests.AutoCoreDataDataAttribute..ctor() in C:\Data\Projects\GlobaleAdministration\Main\Source\GA.CoreData.IntegrationTests\TestFoundation\AutoCoreDataDataAttribute.cs:line 14
at System.RuntimeTypeHandle.CreateCaInstance(RuntimeType type, IRuntimeMethodInfo ctor)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit)
at nCrunch.Reflection.Clr.ClrMember.get_AttributesWithInheritance()
at nCrunch.Reflection.ReflectedMember.GetValuesFromNamedAttributes[T](String[] attributeTypeNames, Func`2 getValueFunc)
at nCrunch.TestExecution.TestMetadataExtractor.#=qOFdBi$rmmWqFlHmpCKP$XDu66wTkQlhj6FKosCyjA9aHie4ZWQbeuNF4vptIG1bL(ReflectedAssembly #=qQoekza42$y53QJqETLiNQQ==, FrameworkTest #=qpe9kZLPnD6eMQIFpIA5dYg==, ReflectedMember #=qFS01TeoTm1pwQU_1sJdxlg==)
at nCrunch.TestExecution.TestMetadataExtractor.InjectNCrunchMetadataIntoFrameworkTest(ReflectedAssembly assembly, FrameworkTest test)
at nCrunch.TestExecution.TestFinder.#=qqqSIuIr31fwOOYp7nhxaFr71u4s36rsHBPSi0X15BgI=(IEnumerable`1 #=qnSotmitojVEEkWNFX5xaLQ==)
at nCrunch.TestExecution.TestFinder.#=qhN6uffUoK3Q4upthKoYwIERO371nHLRpWeTjDfnIoj0=(IList`1 #=q4DCauN2fFW8zwc_q6VafZA==)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, String assemblyFilePath, String[] referencedAssemblyFilePaths, TestFrameworkDescription[] frameworks)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks)
"GA.CoreData.IntegrationTests" is the project of my integration tests, Ploeh.AutoFixture is a library these tests are using.
It looks like my code still has a problem and throws an exception in a constructor. But that should not bring down NCrunch.