I've been using PropertyChanged.Fody for years.
Now I want to also intercept PropertyChanging (to disallow certain property changes). So I installed PropertyChanging.Fody, but it caused errors. So I uninstalled and deleted anything related to Fody in my projects, and reinstalled only PropertyChanging.Fody. Still I get an error.
I'm not even using or implementing anything Fody in my project currently. I just installed and already I can't compile. Here is the error I get:
1>MSBUILD : warning FodyPackageReference: Fody: The package reference for PropertyChanging.Fody does not contain PrivateAssets='All' 1>MSBUILD : error : Fody: An unhandled exception occurred: 1>MSBUILD : error : Exception: 1>MSBUILD : error : Failed to execute weaver C:\Users\y2.nuget\packages\propertychanging.fody\1.30.3\build..\weaver\PropertyChanging.Fody.dll 1>MSBUILD : error : Type: 1>MSBUILD : error : System.Exception 1>MSBUILD : error : StackTrace: 1>MSBUILD : error : at InnerWeaver.ExecuteWeavers() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 222 1>MSBUILD : error : at InnerWeaver.Execute() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 113 1>MSBUILD : error : Source: 1>MSBUILD : error : FodyIsolated 1>MSBUILD : error : TargetSite: 1>MSBUILD : error : Void ExecuteWeavers() 1>MSBUILD : error : Object reference not set to an instance of an object. 1>MSBUILD : error : Type: 1>MSBUILD : error : System.NullReferenceException 1>MSBUILD : error : StackTrace: 1>MSBUILD : error : at ModuleWeaver.HasPropertyChangingEvent(TypeDefinition typeDefinition) 1>MSBUILD : error : at ModuleWeaver.HierarchyImplementsINotify(TypeReference typeReference) 1>MSBUILD : error : at ModuleWeaver.HierarchyImplementsINotify(TypeReference typeReference) 1>MSBUILD : error : at ModuleWeaver.PopulateINotifyNodes(List`1 typeNodes) 1>MSBUILD : error : at ModuleWeaver.BuildTypeNodes() 1>MSBUILD : error : at ModuleWeaver.Execute() 1>MSBUILD : error :
at InnerWeaver.ExecuteWeavers() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 186 1>MSBUILD : error : Source: 1>MSBUILD : error : PropertyChanging.Fody 1>MSBUILD : error : TargetSite: 1>MSBUILD : error : Boolean HasPropertyChangingEvent(Mono.Cecil.TypeDefinition) 1>MSBUILD : error : 1>Done building project "General.vbproj" -- FAILED.
I have 2 Projects. a vase project called "General". and another Project called MyPhone which references General. I installed to both projects. and both give the same error.
The weavers were created in both projects and seem okay.
Deleting bin/obj and cleaning solution multiple times makes no difference.
What can the issue be?
In the end of course I need both. Also PropertyChanging and aslo PropertyChanged.
I'd appreciate any help
Thanks in Advance
Additional Info
This is my regular weavers I've always used:
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged CheckForEquality="false"/>
</Weavers>
If I just add <PropertyChanging />, then I get an error:
Fody: No weavers found for the configuration entries PropertyChanging. Add the desired weavers via their nuget package.
And if I go ahead and install ProperrtyChanging.Fody, Then I get again the above long error about ExecuteWeavers.