inversionhourglass / Rougamo

Compile-time AOP component. Works with any method, whether it is async or sync, instance or static. Uses an aspectj-like pattern to match methods.
MIT License
393 stars 47 forks source link

使用 Rougamo 创建的 snupkg 会提示 pdb 和 dll 不匹配 #54

Closed weilence closed 5 months ago

weilence commented 9 months ago

根据微软的文档配置生成的 snupkg,在上传到 nuget.org 后,会出现下面的错误提示 image

微软的文档: https://learn.microsoft.com/zh-cn/nuget/create-packages/symbol-packages-snupkg snupkg对应的代码:https://github.com/weilence/Light/blob/main/src/Light.EntityFrameworkCore.Transactional/TransactionalAttribute.cs

因为出现了这个问题后,经过排查确认是 Rougamo 导致的,所以才把这个文件单独放一个 csproj 猜测可能跟 #36 有关系?

inversionhourglass commented 9 months ago

嗯,是同类问题,这个问题短时间应该无法修复,目前计划中还有一个版本要先完成,目前打包只能采取不带symbol的

inversionhourglass commented 5 months ago

问题已确认并修复,按以下步骤:

  1. 更新Rougamo.Fody到3.0.0或以上版本
  2. 你的项目Light.EntityFrameworkCore.Transactional新增Fody的NuGet依赖

问题的主要原因是Mono.Cecil之前没有实现checksum的功能,详见 jbevain/cecil#610 ,之后在 jbevain/cecil#810 中修复。

上面的步骤中第二步是必须的,checksum部分需要直接引用Fody才能完成