**这是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公司的开发人员看到这一点,因为我们在此之前处于绝对的停顿状态。我们不能“恢复”它的工作时间,因为当前的配置是在它工作的时候。
发布于 2015-10-02 03:31:29
似乎您的错误实际上是查找一个名为ModuleWeaver的类。这个类是Fody包的一部分。
只需使用以下内容更新nuget包管理器中的包:
update-package Fody -reinstall可能会治好它。
失败:确保您的app.config文件没有不正确的重定向。删除此部分,删除所有重定向。Visual通常会将必要的内容添加回。
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>再试一次,如果失败,请尝试查找哪个依赖程序集正在失败。您可以编写一行命令行应用程序,也可以使用LinqPad。
您可以尝试LinqPad,如果您不使用它,粘贴这个。
Assembly.LoadFile("path to Fody");
Assembly.LoadFile("path to Mono.Cecil");您应该得到一个详细说明丢失库的异常。
发布于 2017-09-28 21:36:13
如果您使用的是git,请从命令行运行以下命令:
git clean -xdf发布于 2017-08-18 19:50:57
在尝试了所有我可以在互联网上找到的解决方案之后,下面的方法对我很有帮助:
Debug和Release文件夹。对我来说,这些都位于像MyPCLProjectName\bin\和iOS\bin\iPhoneSimulator\这样的地方。.csproj文件并删除所有<Import>标记,除了之外,启动<Import Project="$(MSBuildExtensionsPath32)\...的标记除外Solution Explorer > right-click solution > Restore NuGet Packages。https://stackoverflow.com/questions/32893891
复制相似问题