Fody:一个未处理的例外

时间:2015-09-01 13:52:30

标签: c# assemblies fody-costura

我在尝试构建项目时突然遇到异常。似乎与Mono.Cecil有一些东西。但我没有在我的项目中使用Mono。

  

Fehler 13 Fody:发生了未处理的异常:例外:Die Datei   oder Assembly“Mono.Cecil,Version = 0.9.6.0,Culture = neutral,   PublicKeyToken = 0738eb9f132ed756“oineeineAbhängigkeitdavonwurde   nicht gefunden。 Die gefundene Manifestdefinition der assembly stimmt   nicht mit demAssemblyverweisü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 []类型,   ParameterModifier [] modifiers)bei System.Type.GetProperty(String   name,BindingFlags bindingAttr,Binder binder,Type returnType,Type []   类型,ParameterModifier []修饰符)bei   PropertyDelegateBuilder.BuildPropertySetDelegate [T](Type type,String   propertyName)in   C:\ TeamCity的\ buildAgent \工作\ 7495521761d392b9 \ FodyIsolated \ DelegateBuilders \ PropertyDelegateBuilder.cs:Zeile   9. bei DelegateBuilder.BuildDelegateHolder(类型weaverType)在c:\ TeamCity \ buildAgent \ work \ 7495521761d392b9 \ FodyIsolated \ DelegateBuilders \ DelegateBuilder.cs:Zeile   25. bei DelegateBuilder.GetDelegateHolderFromCache(Type weaverType)in   C:\ TeamCity的\ buildAgent \工作\ 7495521761d392b9 \ FodyIsolated \ DelegateBuilders \ DelegateBuilder.cs:Zeile   16. bei InnerWeaver.InitialiseWeavers(List`1 weaverInstances)在c:\ TeamCity \ buildAgent \ work \ 7495521761d392b9 \ FodyIsolated \ InnerWeaver.cs:Zeile   65. bei InnerWeaver.Execute()在c:\ TeamCity \ buildAgent \ work \ 7495521761d392b9 \ FodyIsolated \ InnerWeaver.cs:Zeile   30.来源:mscorlib TargetSite:Void GetSignature(Void *,Int32,System.RuntimeFieldHandleInternal,System.IRuntimeMethodInfo,   System.RuntimeType)

有什么想法吗?我已经尝试重新安装Costura.Fody包。

6 个答案:

答案 0 :(得分:2)

尝试更新项目的Costura.Fody包。对我来说就足够了。

答案 1 :(得分:2)

我通过执行

从版本1.3.4降级到1.3.3解决了这个问题
  

Install-Package Costura.Fody -Version 1.3.3.0

在Package-Manager-Console中。

答案 2 :(得分:1)

这里有完全相同的问题。

它曾经在上周工作,我们没有改变任何东西,现在Costura.Fody似乎寻找Mono.Cecil 0.9.6.0,但我只能在packages文件夹中找到0.9.5.0 ...

我尝试将Costura.Fody降级到1.3.3.0并将Fody降级到1.26.1,但我仍然遇到了完全相同的问题。

您可以在此处看到其他人也遇到此问题: https://github.com/Fody/Costura/issues/118

答案 3 :(得分:0)

Costura.Fody 1.4.1解决了问题

Install-Package Costura.Fody -Version 1.4.1

信用额度@distantcam

答案 4 :(得分:0)

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

答案 5 :(得分:0)

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

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

然后现在它开始从 cauldron.basicinterceptors 获取价值。然后构建成功。

相关问题