RecordPropertyChanged event not firing for trackable collections?

RecordPropertyChanged event does not fire when the items source is assgined a trackable list?

how can I use change tracking on my lists while also taking advantage of RecordPropertyChanged event which I really need?


am using the following libraries:

Virtuosity.Fody : automatically change all class properties to virtual on compile time

PropertyChanged.Fody: automatically raise PropertyChanged event in all members on compile time

joelweiss ChangeTracking: popular library for tracking changes of objects with virtual properties


Note: I attached a sample project to reproduce the issue.


Attachment: SampleApp_733abf5.zip

8 Replies

DM Dhanasekar Mohanraj Syncfusion Team June 20, 2022 02:18 PM UTC

Hi Joseph,

We are tried to check the reported issue in our end. We regret to let you know that we are unable to run the attached sample. We suspect that you are missing to share the DLL’s which is cause the below error,

Error Message:

Severity

Code

Description

Project

File

Line

Suppression State

Error

 

Fody: An unhandled exception occurred:Exception:Could not load file or assembly 'file:///C:\Users\DhanasekarMohanraj\Downloads\SampleApp_733abf5\SampleApp\packages\Fody.6.6.2\netclassictask\FodyIsolated.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)Type:System.IO.FileLoadExceptionStackTrace:   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)   at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)   at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)   at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)   at System.AppDomain.CreateInstanceFromAndUnwrap(String assemblyName, String typeName)   at System.AppDomain.CreateInstanceFromAndUnwrap(String assemblyName, String typeName)   at IsolatedAssemblyLoadContext.CreateInstanceFromAndUnwrap() in C:\projects\fody\FodyCommon\IsolatedAssemblyLoadContext.cs:line 21   at Processor.ExecuteInOwnAssemblyLoadContext() in C:\projects\fody\Fody\Processor.cs:line 130   at Processor.Inner() in C:\projects\fody\Fody\Processor.cs:line 124   at Processor.Execute() in C:\projects\fody\Fody\Processor.cs:line 51Source:mscorlibTargetSite:System.Reflection.RuntimeAssembly _nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.Type:System.NotSupportedExceptionStackTrace:

SampleApp

 

 

 



Could you please check and revert us with the required dlls, it will help us to investigate further and provide you earlier prompt solution.

Regards,
Dhanasekar M.



JO Joseph replied to Dhanasekar Mohanraj June 20, 2022 05:57 PM UTC

the project works fine on my end and there is nothing special about it.  

you don't need any special dlls to run it, just compile the project and visual studio will take care of the rest by automatically downloading any needed NuGet packages.



DM Dhanasekar Mohanraj Syncfusion Team June 21, 2022 02:00 PM UTC

Hi Joseph,


Based on provided information we have checked the reported issue in our end. We have found some other dlls in the package folder and referred it as manually,

Attached package dlls screenshot:



But, still we are facing the same issue (File Not found) while compiling the attached sample. We have updated the error details in our previous update. And here we have attached the tested video demo. Please have a look on this. And please share the required library files or please update if we are missing anything in the attached sample. It will be helpful for us to understand the exact problem and to provide you a prompt solution at the earliest.

Regards,
Dhanasekar M.



DM Dhanasekar Mohanraj Syncfusion Team June 22, 2022 05:01 AM UTC

Hi Joseph,

Sorry for the inconvenience caused.

We have missed to attach the tested video demo in our previous update. Here we have attached that.

Regards,
Dhanasekar M.


Attachment: VideoDemo_acfea791.zip


JO Joseph June 23, 2022 04:17 PM UTC

try this sample project it should work now

I removed all fody related NuGet packages which is the root cause of the errors your getting.


Attachment: SampleApp_3b3cbf3b.zip


DM Dhanasekar Mohanraj Syncfusion Team June 24, 2022 02:34 PM UTC

Hi Joseph,

Currently, we are analyzing the provided sample in our end. We will check and update you further details on June 28, 2022.

We appreciate your patience until then.

Regards,
Dhanasekar M.



DM Dhanasekar Mohanraj Syncfusion Team June 28, 2022 03:45 PM UTC

Hi Joseph,

Still, we are checking the reported issue in our end. We will check and update you further details on June 30, 2022.
We appreciate your patience and understanding.

Regards,
Dhanasekar M.



DM Dhanasekar Mohanraj Syncfusion Team June 30, 2022 03:25 PM UTC

Hi Joseph,


Based on provided details we have checked the reported issue in our end. When you are using list as trackable it returns the Ilist objects. There is no active listener in the Ilist, that’s why the RecordPropertyChanged event does not triggered. Can you please share purpose for using the list AsTrackable This would help us to proceed further.

Regards,
Dhanasekar M.


Loader.
Up arrow icon