简体   繁体   English

从Fody> = 4.0.0开始,NCrunch构建失败,“无法将透明代理转换为IInnerWeaver”

[英]NCrunch build fails, starting with fody >= 4.0.0 “Cannot convert transparent proxy to IInnerWeaver”

I have the following error while building my projects using NCrunch. 使用NCrunch构建项目时出现以下错误。

Fody: An unhandled exception occurred:
Exception:
Der transparente Proxy kann nicht in den Typ "IInnerWeaver" umgewandelt werden.
Type:
System.InvalidCastException
StackTrace:
   bei Processor.ExecuteInOwnAssemblyLoadContext()
   bei Processor.Inner()
   bei Processor.Execute()
Source:
Fody
TargetSite:
Void ExecuteInOwnAssemblyLoadContext()

It took me a while to determin howto reproduce the error: 我花了一些时间来确定如何重现该错误:

Create a new c# library (net472) and install the nuget package NullGuard.Fody (1.8.7) which has a dependency to Fody (>= 3.3.5) . 创建一个新的c#库(net472)并安装nuget包NullGuard.Fody(1.8.7) ,该包具有对Fody(> = 3.3.5)的依赖关系。 Do not use packages.conf, but the new PackageReference format. 不要使用packages.conf,而是使用新的PackageReference格式。 Add FodyWeavers.xml. 添加FodyWeavers.xml。

Activate NCrunch (3.26.0.4 in Visual Studio 2019) using these settings: 使用以下设置激活NCrunch(Visual Studio 2019中为3.26.0.4):

  • Allow parallel execution 允许并行执行
  • Run all tests automatically 自动运行所有测试
  • Do not ignore tests by default 默认不忽略测试

Both, Visual Studio and NCrunch can sucessfully build the project. Visual Studio和NCrunch都可以成功构建项目。

Install Fody (4.0.0) , now, NCrunch cannot build any more, but Visual Studio still can. 现在安装Fody(4.0.0) ,NCrunch无法再构建,但Visual Studio仍然可以。

Is this a fody/ncrunch bug, or do I miss something? 这是fody / ncrunch的错误,还是我错过了什么?

这应该在Fody版本5.0.5中修复https://github.com/Fody/Fody/milestone/109

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

相关问题 MSpec Json.NET反序列化测试在ReSharper中失败但在NCrunch中传递 - MSpec Json.NET deserialization test fails in ReSharper but passes in NCrunch 无法将 Costura.Fody 与 ConfuserEx 一起使用 - Cannot use Costura.Fody with ConfuserEx Selenium - 带透明代理的MoveToElement() - Selenium - MoveToElement() with transparent proxy Xamarin Studio构建目标?试图让Fody工作? - Xamarin Studio build targets? Trying to get Fody working? TFS生成失败,“无法访问文件* FakeTypesCache” - TFS Build fails with “cannot access file *FakeTypesCache” 原始类型的透明代理 - Transparent proxy to original type JustMock和nCrunch - JustMock and nCrunch Ncrunch首次运行所有测试通过,但是在代码更改后和按下“运行所有”按钮时失败 - Ncrunch all test pass first run, but fails after code change and when run all button is pressed 我可以使用NUnit和NCrunch通过预处理器指令测试多个构建配置吗? - Can I Use NUnit & NCrunch to Test Multiple Build Configurations with Preprocessor Directives? 对远程对象的弱引用(透明代理) - WeakReference to remote object (transparent proxy)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM