Hello,
I have an ASP.NET Core project which is targeting netcoreapp3.1. I started upgrading it to net5.0 both the projects themselves and the test project and I started having this error:
An error occurred while analysing this project after it was built: NCrunch encountered an unexpected error occurred while building an environment to analyse an assembly: System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at nCrunch.Core.InlineModules.AspNetMvcTestHostModule.AspNetMvcTestHostExtension.(SnapshotComponent , IList`1 , ProcessLoadParameters )
at nCrunch.Core.TestManagement.TestRunnerProcess.(Nullable`1 , FilePath , GridClientId , CustomVariable[] )
at nCrunch.Core.TestManagement.TestRunnerProcess..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.TestManagement.TestRunnerProcess.LoadTestRunnerProcessForProjectReturningProcessId(SnapshotComponent snapshotComponent, IList`1 componentsInProcess, TestFrameworkDescription[] testingFrameworks, Nullable`1 newProcessTag, FilePath solutionFilePath, GridClientId client, CustomVariable[] customEnvironmentVariables)
at nCrunch.Core.Processing.AnalysisTaskLogic.DoProcessTaskAndReturnSuccessFlag()
I tried cleaning the NCrunch cache, cleaning and rebuilding the solution, nothing seems to help.
I have some other ASP.NET Core project which is migrated to net5.0 and it works normally. NCrunch runs the tests just fine.
Let me know what can I do to help debugging. I tried looking at the logs (via reporting a bug then looking at the .zip file) but couldn't find anything.
Thanks!