简体   繁体   English

Fody:发生了未处理的异常

[英]Fody: An Unhandled Exception Occured

I am suddenly getting an exception when trying to build the project.尝试构建项目时突然出现异常。 Seems to have something todo with Mono.Cecil.似乎与 Mono.Cecil 有关系。 But I am not using Mono in my project.但我没有在我的项目中使用 Mono。

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. Fehler 13 Fody:发生未处理的异常:异常: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. 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() (Ausnahme von HRESULT: 0x80131040) StackTrace: bei System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType) bei System.Reflection.RuntimeMethodInfoTurnSystemParameter.FetchNbei System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig) () 在 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\\Deleg 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[] 类型,ParameterModifier[] 修饰符) bei System.Type.GetProperty(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] 修饰符) 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\\buildAgent\\buildAgentI\\buildAgentI\\buildAgentI\\buildAgentI DelegateBuilder.cs:Zeile 25. bei DelegateBuilder.GetDelegateHolderFromCache(Type weaverType) in c:\\TeamCity\\buildAgent\\work\\7495521761d392b9\\FodyIsolated\\DelegateBuilders\\Deleg ateBuilder.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) ateBuilder.cs:Zeile 16. bei InnerWeaver.InitialiseWeavers(List`1 weaverInstances) in c:\\TeamCity\\buildAgent\\work\\7495521761d392b9\\FodyIsolated\\InnerWeaver.cs:Zeile 65. 执行 bei InnerCity:\\TeamWeaver. buildAgent\\work\\7495521761d392b9\\FodyIsolated\\InnerWeaver.cs:Zeile 30。来源:mscorlib TargetSite:Void GetSignature(Void*, Int32, System.RuntimeFieldHandleInternal, System.IRuntimeMethodInfo, System.RuntimeType)

Any ideas?有任何想法吗? I already tried to reinstall the Costura.Fody package.我已经尝试重新安装 Costura.Fody 包。

I solved this problem by downgrading from Version 1.3.4 to 1.3.3 by executing我通过执行从版本 1.3.4 降级到 1.3.3 解决了这个问题

Install-Package Costura.Fody -Version 1.3.3.0安装包 Costura.Fody -Version 1.3.3.0

in Package-Manager-Console.在包管理器控制台中。

Try to update Costura.Fody packages for your project.尝试为您的项目更新 Costura.Fody 包。 For me it was enough.对我来说已经足够了。

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...它曾经在上周工作,我们没有改变任何东西,现在 Costura.Fody 似乎在寻找 Mono.Cecil 0.9.6.0,但我只能在包文件夹中找到 0.9.5.0...

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.我尝试将 Costura.Fody 降级到 1.3.3.0 并将 Fody 降级到 1.26.1,但我仍然遇到完全相同的问题。

You can see that other people are having this issue too here: https://github.com/Fody/Costura/issues/118你可以在这里看到其他人也有这个问题: https : //github.com/Fody/Costura/issues/118

Costura.Fody 1.4.1 solved the problem Costura.Fody 1.4.1 解决了问题

Install-Package Costura.Fody -Version 1.4.1

credit goes here @distantcam功劳在这里@distantcam

当我将 Fody 包 ( https://github.com/Fody/Fody ) 更新到 3.1.4 版本时,它会得到修复

I went to the nuget folder eg C:/../.nuget\\packages\\cauldron.interception.fody\\3.2.3\\netclassicweaver\\Cauldron.Interception.Fody.dll我去了 nuget 文件夹,例如 C:/../.nuget\\packages\\cauldron.interception.fody\\3.2.3\\netclassicweaver\\Cauldron.Interception.Fody.dll

Deleted this cauldron.interception.fody folder.删除了这个 cauldron.interception.fody 文件夹。

Then now it started taking value from cauldron.basicinterceptors.然后现在它开始从 cauldron.basicinterceptors 获取价值。 andf then build became successful.然后构建成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Fody:发生未处理的异常 - Fody: An unhandled exception has occured 空字段执行期间发生未处理的异常 - Unhandled exception occured during executing of empty field 发生未处理的异常。 在Xamarin Visual Studio上 - An unhandled exception occured. on Xamarin Visual Studio XamariniForms,拍照,发生未处理的异常 - XamariniForms, take photo, An unhandled exception occured 如何知道未处理的异常发生在哪里? - How to know where the unhandled exception occured? Xamarin IOS-启动期间发生“未处理的异常” - Xamarin IOS - 'An unhandled exception occured' during start 更新ObservableCollection列表时发生未处理的异常 - An unhandled exception occured when updating ObservableCollection list WTApp中发生类型为'System.StackOverflowException'的未处理异常 - An unhandled exception of type 'System.StackOverflowException' occured in WTApp 如何捕获“在AppName [procId]中发生未处理的win32异常。” - How to catch “Unhandled win32 exception occured in AppName [procId].” mscorlib.dll 中发生 System.TypeInitializationException 类型的未处理异常 - Unhandled exception of type System.TypeInitializationException occured in mscorlib.dll
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM