Hi there,
My unit test project is intermittently failing to build by NCrunch with the following error,
C:\Program Files\dotnet\sdk\8.0.413\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets: The "GenerateDepsFile" task failed unexpectedly.
System.ArgumentException: An item with the same key has already been added. Key: clypse.core.UnitTests
at System.Collections.Generic.CollectionExtensions.LibraryCollectionToDictionary[T](IReadOnlyList`1 collection)
at Microsoft.Extensions.DependencyModel.DependencyContextWriter.WritePortableTarget(String key, IReadOnlyList`1 runtimeLibraries, IReadOnlyList`1 compilationLibraries, Utf8JsonWriter jsonWriter)
at Microsoft.Extensions.DependencyModel.DependencyContextWriter.WriteTargets(DependencyContext context, Utf8JsonWriter jsonWriter)
at Microsoft.Extensions.DependencyModel.DependencyContextWriter.Write(DependencyContext context, Stream stream)
at Microsoft.NET.Build.Tasks.GenerateDepsFile.WriteDepsFile(String depsFilePath)
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.NET.Build.Tasks.TaskWithAssemblyResolveHooks.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
I can fix it temporarily by closing visual studio. deleting obj and bin folders, then loading up again. But then a few changes later it's back again.
My version isn't the latest (5.11.0.1). I looked through the forum and found some old mentions about it but nothing new (unless I completely missed it)
Is this something that is addressed with a newer release or is there some kind of workaround?
Btw my solution consists of 2 projects,
clypse.core
clypse.core.UnitTests
Nick.