Steps to reproduce:1. Checkout the AutoFixture repo:
https://github.com/AutoFixture/AutoFixture
2. Open the Src/AutoFixture.sln project.
3. Try to discover all the tests.
Result: Discovery fails for .NET Core App framework. Here are examples of errors:
Quote:
An error occurred while analysing this project after it was built: System.Exception: Error while discovering test 'AutoFixtureUnitTest.RandomRangedNumberGeneratorTest.CreationOnFullRangeShouldntFail("System.SByte", "-128", "127")':System.Runtime.Serialization.SerializationException: Unknown primitive type: System.SByte
at nCrunch.Common.Serialization.BinarySerializer.writePrimitiveType(BinaryWriter writer, Object value)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.CustomTypeSerializers.ObjectArraySerializer.Serialize(SerializationContext context, SerializationContractType type, Object value, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Module.XUnit2.XUnitBinarySerializer.Serialize(Stream stream, Object graph)
at nCrunch.TestExecution.Frameworks.XUnit2.TestCaseArgumentData.StoreInTest(FrameworkTest test)
at nCrunch.Module.XUnit2.Integration.XUnitNCrunchDiscoveredTestContainer.StoreDiscoveredTest(ITestCase testCase, TestName testName)
at nCrunch.Module.XUnit2.Integration.XUnitDiscoveryMessageSink.discoverTest(ITestCase testCase)
Quote:
Error while discovering test 'AutoFixtureUnitTest.Kernel.MultidimensionalArrayRelayTest.Create3DimensionalArrayReturnsCorrectResult([[["12"]]], ["12"])':System.Runtime.Serialization.SerializationException: Cannot find serialization contract for type: System.Int32[][]
Expected result:Discovery should pass successfully.
Notes:For history: current SHA1 of the master is c7a27680155bcaf22dc1f6e6d62f14cc8614217c.
It seems you cannot serialize SByte and multi-dimensional arrays.
Thank you!