1

我正在使用 Fody 和 Ionad 替换静态调用,DateTime.Now如文档中所述:

[StaticReplacement(typeof(DateTime))]
public static class DateTimeSubstitute
{
    public static IDateTime Current { get; set; }

    public static DateTime Now { get { return Current.Now; } }
}

这适用于我的项目中的程序集。但是,我的项目没有直接引用外部程序集,我需要执行相同的替换,但按需...

如何为特定程序集运行 Fody Ionide(给定路径?)

4

1 回答 1

0

Fody 目前不支持针对非项目 dll 执行。也就是说,您只能从当前项目中运行它并以该当前项目的程序集为目标

于 2019-07-29T07:49:06.773 回答