Dot-Net
“GenerateBindingRedirectsOutputType”選項有什麼作用?
在 csproj 文件中設置為“true”時,“GenerateBindingRedirectsOutputType”選項有什麼作用?
正如我們在這裡看到的那樣,我們需要
AutoGenerateBindingRedirects和GenerateBindingRedirectsOutputType標誌來使“自動生成綁定重定向”工作。
GenerateBindingRedirectsOutputType``exe如果您正在建構或winexe如此處所寫,將設置為 true 。因此,如果您需要在建構庫 dll 時生成綁定重定向,則需要
GenerateBindingRedirectsOutputType手動指定標誌。
生成 .exe 執行檔的項目不需要它,但單元測試項目需要它。