Reputation: 332
I am suddenly getting an exception when trying to build the project. Seems to have something todo with Mono.Cecil. But I am not using Mono in my project.
Fehler 13 Fody: An unhandled exception occurred: Exception: Die Datei oder Assembly "Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040) StackTrace: bei System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType) bei System.Reflection.RuntimeMethodInfo.FetchNonReturnParameters() bei System.Reflection.RuntimeMethodInfo.GetParametersNoCopy() bei System.Reflection.RuntimePropertyInfo.GetIndexParametersNoCopy()
bei System.Reflection.RuntimePropertyInfo.GetIndexParameters() bei System.RuntimeType.GetPropertyCandidates(String name, BindingFlags bindingAttr, Type[] types, Boolean allowPrefixLookup) bei System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) bei System.Type.GetProperty(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) bei PropertyDelegateBuilder.BuildPropertySetDelegate[T](Type type, String propertyName) in c:\TeamCity\buildAgent\work\7495521761d392b9\FodyIsolated\DelegateBuilders\PropertyDelegateBuilder.cs:Zeile 9. bei DelegateBuilder.BuildDelegateHolder(Type weaverType) in c:\TeamCity\buildAgent\work\7495521761d392b9\FodyIsolated\DelegateBuilders\DelegateBuilder.cs:Zeile 25. bei DelegateBuilder.GetDelegateHolderFromCache(Type weaverType) in c:\TeamCity\buildAgent\work\7495521761d392b9\FodyIsolated\DelegateBuilders\DelegateBuilder.cs:Zeile 16. bei InnerWeaver.InitialiseWeavers(List`1 weaverInstances) in c:\TeamCity\buildAgent\work\7495521761d392b9\FodyIsolated\InnerWeaver.cs:Zeile 65. bei InnerWeaver.Execute() in c:\TeamCity\buildAgent\work\7495521761d392b9\FodyIsolated\InnerWeaver.cs:Zeile 30. Source: mscorlib TargetSite: Void GetSignature(Void*, Int32, System.RuntimeFieldHandleInternal, System.IRuntimeMethodInfo, System.RuntimeType)
Any ideas? I already tried to reinstall the Costura.Fody package.
Upvotes: 6
Views: 9810
Reputation: 71
I went to the nuget folder eg C:/../.nuget\packages\cauldron.interception.fody\3.2.3\netclassicweaver\Cauldron.Interception.Fody.dll
Deleted this cauldron.interception.fody folder.
Then now it started taking value from cauldron.basicinterceptors. andf then build became successful.
Upvotes: 0
Reputation: 808
it gets fixed when I update Fody package (https://github.com/Fody/Fody) to 3.1.4 version
Upvotes: 0
Reputation: 9843
Costura.Fody 1.4.1 solved the problem
Install-Package Costura.Fody -Version 1.4.1
credit goes here @distantcam
Upvotes: 0
Reputation: 332
I solved this problem by downgrading from Version 1.3.4 to 1.3.3 by executing
Install-Package Costura.Fody -Version 1.3.3.0
in Package-Manager-Console.
Upvotes: 3
Reputation: 21
Try to update Costura.Fody packages for your project. For me it was enough.
Upvotes: 2
Reputation: 171
Having the exact same issue here.
It used to work last week, we did not change anything and now Costura.Fody seems to look for Mono.Cecil 0.9.6.0, but I can only find 0.9.5.0 in the packages folder...
I tried downgrading Costura.Fody to 1.3.3.0 and Fody to 1.26.1 but i'm still having the exact same problem.
You can see that other people are having this issue too here: https://github.com/Fody/Costura/issues/118
Upvotes: 1