Build/Test Issues

A project using Fody & PropertyChanged not building

Started by MihaMarkic on 3,244 views

Hi,

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)
Additional note: When I disable RDI, it works as before.
Hi, thanks for sharing this issue.

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.

Edited

Would you be interested in trying v5.2? I've just pushed this to the download page, and I'm hopeful it will solve this problem for you.
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.
Thanks! I'll check it out and will get back to you.
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)
Could you try the build below and let me know if this solves the issue?

NCrunch_Console_5.3.0.1.msi
NCrunch_Console_5.3.0.1.zip
NCrunch_GridNodeServer_5.3.0.1.msi
NCrunch_GridNodeServer_5.3.0.1.zip
NCrunch_LicenseServer_5.3.0.1.zip
NCrunch_Rider_5.3.0.1.7z
NCrunch_Rider_5.3.0.1.zip
NCrunch_VS2010_5.3.0.1.msi
NCrunch_VS2010_5.3.0.1.zip
NCrunch_VS2012_5.3.0.1.msi
NCrunch_VS2012_5.3.0.1.zip
NCrunch_VS2013_5.3.0.1.msi
NCrunch_VS2013_5.3.0.1.zip
NCrunch_VS2015_5.3.0.1.msi
NCrunch_VS2015_5.3.0.1.msi.7z
NCrunch_VS2015_5.3.0.1.zip
NCrunch_VS2017_5.3.0.1.msi
NCrunch_VS2017_5.3.0.1.msi.7z
NCrunch_VS2017_5.3.0.1.zip
NCrunch_VS2019_5.3.0.1.msi
NCrunch_VS2019_5.3.0.1.msi.7z
NCrunch_VS2019_5.3.0.1.zip
NCrunch_VS2022_5.3.0.1.msi
NCrunch_VS2022_5.3.0.1.msi.7z
NCrunch_VS2022_5.3.0.1.zip
Just submitted a bug report for the same issue. Should have looked here first. 5.3.0.1 resolved the issue for me.
Remco wrote:Could you try the build below and let me know if this solves the issue?

NCrunch_Console_5.3.0.1.msi
NCrunch_Console_5.3.0.1.zip
NCrunch_GridNodeServer_5.3.0.1.msi
NCrunch_GridNodeServer_5.3.0.1.zip
NCrunch_LicenseServer_5.3.0.1.zip
NCrunch_Rider_5.3.0.1.7z
NCrunch_Rider_5.3.0.1.zip
NCrunch_VS2010_5.3.0.1.msi
NCrunch_VS2010_5.3.0.1.zip
NCrunch_VS2012_5.3.0.1.msi
NCrunch_VS2012_5.3.0.1.zip
NCrunch_VS2013_5.3.0.1.msi
NCrunch_VS2013_5.3.0.1.zip
NCrunch_VS2015_5.3.0.1.msi
NCrunch_VS2015_5.3.0.1.msi.7z
NCrunch_VS2015_5.3.0.1.zip
NCrunch_VS2017_5.3.0.1.msi
NCrunch_VS2017_5.3.0.1.msi.7z
NCrunch_VS2017_5.3.0.1.zip
NCrunch_VS2019_5.3.0.1.msi
NCrunch_VS2019_5.3.0.1.msi.7z
NCrunch_VS2019_5.3.0.1.zip
NCrunch_VS2022_5.3.0.1.msi
NCrunch_VS2022_5.3.0.1.msi.7z
NCrunch_VS2022_5.3.0.1.zip


Seems working over here, too.
Remco wrote:Could you try the build below and let me know if this solves the issue?

NCrunch_Console_5.3.0.1.msi
NCrunch_Console_5.3.0.1.zip
NCrunch_GridNodeServer_5.3.0.1.msi
NCrunch_GridNodeServer_5.3.0.1.zip
NCrunch_LicenseServer_5.3.0.1.zip
NCrunch_Rider_5.3.0.1.7z
NCrunch_Rider_5.3.0.1.zip
NCrunch_VS2010_5.3.0.1.msi
NCrunch_VS2010_5.3.0.1.zip
NCrunch_VS2012_5.3.0.1.msi
NCrunch_VS2012_5.3.0.1.zip
NCrunch_VS2013_5.3.0.1.msi
NCrunch_VS2013_5.3.0.1.zip
NCrunch_VS2015_5.3.0.1.msi
NCrunch_VS2015_5.3.0.1.msi.7z
NCrunch_VS2015_5.3.0.1.zip
NCrunch_VS2017_5.3.0.1.msi
NCrunch_VS2017_5.3.0.1.msi.7z
NCrunch_VS2017_5.3.0.1.zip
NCrunch_VS2019_5.3.0.1.msi
NCrunch_VS2019_5.3.0.1.msi.7z
NCrunch_VS2019_5.3.0.1.zip
NCrunch_VS2022_5.3.0.1.msi
NCrunch_VS2022_5.3.0.1.msi.7z
NCrunch_VS2022_5.3.0.1.zip



Working for me as well, thank you!
This post has been deleted.

Post a reply

Log in to reply.