Costura.Fody 使用问题

1. Costura.Fody 引用后,未能正常合并资源文件。用着用着就不行了

解决方案:在csproj所在的文件目录,找到FodyWeavers.xml,添加<Costura/>

1 <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
2   <Costura />
3 </Weavers>

 

2. 编译时有Fody相关的警告

MSBUILD : warning FodyPackageReference: Fody: The package reference for Costura.Fody is missing the 'compile' part in the IncludeAssets setting; it's recommended to completely remove IncludeAssets

解决方案:打开csproj,对Fody的Nuget引用修改IncludeAssets属性,添加compile

1     <PackageReference Include="Costura.Fody">
2       <Version>5.7.0</Version>
3       <IncludeAssets>runtime;compile;build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4       <PrivateAssets>all</PrivateAssets>
5     </PackageReference>

 

posted @   唐宋元明清2188  阅读(1449)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)
点击右上角即可分享
微信分享提示
剑桥
16:15发布
剑桥
16:15发布
7°
西南风
3级
空气质量
相对湿度
66%
今天
2°/10°
周三
2°/8°
周四
中雨
2°/7°