【问题标题】:What does the 'GenerateBindingRedirectsOutputType' option do?“GenerateBindingRedirectsOutputType”选项有什么作用?
【发布时间】:2020-01-18 23:04:58
【问题描述】:

当在 csproj 文件中设置为“true”时,“GenerateBindingRedirectsOutputType”选项有什么作用?

【问题讨论】:

    标签: .net msbuild csproj


    【解决方案1】:

    正如我们所看到的here,我们需要AutoGenerateBindingRedirectsGenerateBindingRedirectsOutputType 标志来使“自动生成绑定重定向”的一些东西起作用。

    GenerateBindingRedirectsOutputType 将设置为 true,以防您正在构建 exewinexe,如 here 所写。

    因此,如果您需要在构建库 dll 时生成绑定重定向,您需要手动指定 GenerateBindingRedirectsOutputType 标志。

    【讨论】:

      【解决方案2】:

      生成 .exe 可执行文件的项目不需要它,但单元测试项目需要它。

      【讨论】:

        猜你喜欢
        • 2016-11-02
        • 2012-02-17
        • 2017-01-11
        • 2013-09-02
        • 2019-09-06
        • 1970-01-01
        • 2017-07-24
        • 2012-08-03
        • 2020-11-13
        相关资源
        最近更新 更多