This project worked fine with 4.* and it stopped after I've upgraded to 5.1.
When I enabled Fody/PropertyChanged on a .net 8 project, NCrunch throws the error below.
If I comment out PropertyChanged plugin, NCrunch works.
Is this a bug or am I missing a setting?
NCrunch has encountered an internal error: System.Exception: System.NotImplementedException: The method or operation is not implemented.
at nCrunch.Compiler.Cil.Types.CilTypeReference.get_DeclaringAssemblyRefTableIndex()
at nCrunch.Compiler.Cil.Types.CilTypeReference.get_IsReferencingRuntimeSystemLibrary()
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly.IdentifyRdiTypeHandlingStrategies()
at nCrunch.Compiler.RuntimeDataInspection.RdiTypeHandlingStrategyIdentificationTask..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.RuntimeDataInspection.RdiTypeHandlingStrategyIdentificationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
at nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
at nCrunch.Core.BuildManagement.BuildEnvironment..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridClientDescription clientDescription, Boolean extractCoverageReportStructure)
It looks like your project has a certain IL sequence that we haven't tested RDI for. Is this on an open source solution, or do you have a way to reproduce the issue with a sample solution that you can share with me through the NCrunch contact form?
Edit: Actually, I think I've figured this one out. It looks like this is a multi-module assembly (we don't get many of those these days). I've implemented a fix for this and will let you know when the build is available. My testing for multi-module assemblies is a bit light at the moment .. I'm hopeful this is the only problem we find here.
Sure, I did but the result is the same. I also tried to quickly put a simple repro together, but it isn't that easy to create one. However, I have an open source project where this problem manifests - https://github.com/MihaMarkic/modern-vice-pdb-monitor.
Open \source\Modern.Vice.PdbMonitor\Modern.Vice.PdbMonitor.sln solution and enabled RDI - you'll see that project Modern.Vice.PdbMonitor.Engine won't build while RDI is enabled.
I've seen the same behavior wherever I have Fody.PropertyChanged enabled - I have a feeling that it's somehow connected.
Let me know if I can help further with diagnostics.
I am also having a similar issue on a .NET standard 2.0 project, stack trace below. Disabling RDI does not fix it.
NCrunch has encountered an internal error: System.Exception: System.NotImplementedException: The method or operation is not implemented.
at nCrunch.Compiler.Cil.Types.CilTypeReference.get_DeclaringAssemblyRefTableIndex()
at nCrunch.Compiler.Cil.Types.CilTypeReference.get_IsReferencingRuntimeSystemLibrary()
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly.IdentifyRdiTypeHandlingStrategies()
at nCrunch.Compiler.RuntimeDataInspection.RdiTypeHandlingStrategyIdentificationTask..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.RuntimeDataInspection.RdiTypeHandlingStrategyIdentificationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
at nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
at nCrunch.Core.BuildManagement.BuildEnvironment..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridClientDescription clientDescription, Boolean extractCoverageReportStructure)