Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

A project using Fody & PropertyChanged not building
MihaMarkic
#1 Posted : Thursday, March 7, 2024 1:21:38 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/8/2015(UTC)
Posts: 11
Location: Slovenia

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
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?

Quote:
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)
MihaMarkic
#2 Posted : Thursday, March 7, 2024 1:39:47 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/8/2015(UTC)
Posts: 11
Location: Slovenia

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Additional note: When I disable RDI, it works as before.
Remco
#3 Posted : Thursday, March 7, 2024 6:39:09 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,981

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
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.
Remco
#4 Posted : Friday, March 8, 2024 6:49:03 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,981

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
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.
MihaMarkic
#5 Posted : Friday, March 8, 2024 7:45:30 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/8/2015(UTC)
Posts: 11
Location: Slovenia

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
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/MihaM...odern-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.
Remco
#6 Posted : Friday, March 8, 2024 9:26:23 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,981

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks! I'll check it out and will get back to you.
AjiBuster499
#7 Posted : Friday, March 8, 2024 1:44:50 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/8/2024(UTC)
Posts: 2

Thanks: 1 times
I am also having a similar issue on a .NET standard 2.0 project, stack trace below. Disabling RDI does not fix it.

Quote:
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)
Remco
#8 Posted : Saturday, March 9, 2024 5:06:00 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,981

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
3 users thanked Remco for this useful post.
MihaMarkic on 3/11/2024(UTC), eriove on 3/11/2024(UTC), AjiBuster499 on 3/11/2024(UTC)
eriove
#11 Posted : Monday, March 11, 2024 8:10:32 AM(UTC)
Rank: Member

Groups: Registered
Joined: 3/22/2016(UTC)
Posts: 21
Location: Sweden

Thanks: 14 times
Was thanked: 2 time(s) in 2 post(s)
Just submitted a bug report for the same issue. Should have looked here first. 5.3.0.1 resolved the issue for me.
MihaMarkic
#9 Posted : Monday, March 11, 2024 9:46:05 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/8/2015(UTC)
Posts: 11
Location: Slovenia

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
AjiBuster499
#10 Posted : Monday, March 11, 2024 12:14:57 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/8/2024(UTC)
Posts: 2

Thanks: 1 times
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.097 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download