** 这是 Visual Studio 2013 中的一个问题。
我得到的错误是巨大的,而且大多是无用的,但它的症结在于
Error 130 Fody: Could not load 'ModuleWeaver' from 'PropertyChanged.Fody, Version=1.50.3.0, Culture=neutral, PublicKeyToken=null' due to ReflectionTypeLoadException.
It is possible you need to update the package.
exception.LoaderExceptions:
System.IO.FileLoadException: Could not load file or assembly 'Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
同样,由于没有任何变化,我不知道它的一般问题是什么。它正在寻找的 DLL 位于它一直所在的位置。
编辑:显然在这一点上它厌倦了吐出那个错误,所以它制造了一个新的
Error 42 The "Fody.WeavingTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
File name: 'Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
at ExceptionExtensions.LogException(ILogger logger, Exception exception)
at Processor.Execute() in c:\TeamCity\buildAgent\work\7495521761d392b9\Fody\Processor.cs:line 56
at Fody.WeavingTask.Execute() in c:\TeamCity\buildAgent\work\7495521761d392b9\Fody\WeavingTask.cs:line 44
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
编辑2:
此外,据称该错误发生在第 50 行的“Fody.targets”内,即
<Fody.WeavingTask
AssemblyPath="@(IntermediateAssembly)"
IntermediateDir="$(IntermediateDir)"
KeyFilePath="$(FodyKeyFilePath)"
ProjectDirectory="$(ProjectDir)"
SolutionDir="$(FodySolutionDir)"
References="@(ReferencePath)"
SignAssembly="$(FodySignAssembly)"
ReferenceCopyLocalPaths="@(ReferenceCopyLocalPaths)"
DefineConstants="$(DefineConstants)"
/>
编辑3:
我删除了所有与 Fody 相关的文件,Nuget 在构建过程中重新下载了它们。之后的错误与第二个错误相同:
"Error 42 The "Fody.WeavingTask" task failed unexpectedly."
编辑4:
我真的希望 Fody 的开发人员能看到这一点,因为在解决此问题之前,我们处于绝对停滞状态。我们不能“恢复”到它工作的时候,因为当前的配置是它工作的时候。