[英]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):
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.