Build/Test Issues

Ncrunch gives build error when upgrading MSTest.TestAdapter to version 3.0.2

Started by mtegard on 2,045 views

I use NCrunch for Visual Studio 2022, version 4.15.0.4.

When i update the following nugetpackages in my test-projects from version 2.2.10 to version 3.0.2, NCrunch starts giving build errors for some projects (not all of them):
  • MSTest.TestAdapter
  • MSTest.TestFramework

I get no builderrors when i run the same testprojects in Visual Studio Test Explorer. Only builderror with NCrunch.
I get no builderrors with NCrunch when I downgrade the packages to version 2.2.10 again.

Doesn't NCrunch version 4.15.0.4. support version 3.0.2 of MSTest.TestAdapter and MSTest.TestFramework?

Here is the error:
NCrunch has encountered an internal error: System.Exception: System.InvalidCastException: Det gick inte att omvandla ett objekt av typen System.Double till typen System.Object[].
vid nCrunch.Module.MSTest.Integration.MSTestCilResolvedParameters..ctor(CilCustomAttribute dataRowAttribute)
vid nCrunch.Module.MSTest.Integration.MSTestCilDiscoverer.createTestCases(CilMethodDefinition method, CilTypeDefinition fixture)
vid nCrunch.Module.MSTest.Integration.MSTestCilDiscoverer.<FindFrameworkTestsInAssembly>b__12_0()
vid nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
vid nCrunch.Module.MSTest.Integration.MSTestCilDiscoverer.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
vid nCrunch.TestExecution.TestFinder..()
vid nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
vid nCrunch.TestExecution.TestFinder..()
vid nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
vid nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, DescribedTestFrameworkDiscoverer[] describedDiscoverers, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
vid nCrunch.Compiler.StaticManipulation.BuiltCilAssembly.DiscoverTests(TestFrameworkDescription[] applicableTestFrameworks, ComponentUniqueName testComponentUniqueName)
vid nCrunch.Compiler.CilProcessingTasks.CilTestDiscoveryTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
vid nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
vid nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
vid nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
vid nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
vid nCrunch.Core.BuildManagement.BuildEnvironment..()
vid nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
vid nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress, Boolean extractCoverageReportStructure)
Might be the same problem as this:

https://forum.ncrunch.net/yaf_postst3271_DataRow-issue-with-MSTest-3.aspx
mtegard wrote:Might be the same problem as this:

https://forum.ncrunch.net/yaf_postst3271_DataRow-issue-with-MSTest-3.aspx


Yes, this looks like the same one. We do have a fix for this which is ready to go out with the new build, but switching your framework utilisation type is an effective workaround for the problem until the new build becomes available.

Post a reply

Log in to reply.