如何在不使用 msbuild 的情况下使用 Fody 来编织已编译的 dll?

How can Fody be used to weave compiled dll's without using msbuild?

我知道默认情况下 Fody 将程序集编织为 Visual Studio 中的 post 构建步骤。

但是我有一个自定义工具可以使用 csc.exe(Roslyn 编译器)直接编译项目。是否可以 运行 Fody 作为 executable/service 而不是 post-构建步骤?

像这样:fody.exe target.dll fody_settings.xml

试试这个

免责声明:虽然这些 class 是 public,但这不被视为暴露的 API。所以在次要版本发布中,这些 classes 可能会改变。