error MSB6006:"mt.exe" exited with code 31的解決辦法
一、問題出現
用VS編譯專案的時候,總是遇到error MSB6006: "mt.exe" exited with code 31.這個問題。
具體錯誤如下:
二、解決辦法
設定project的屬性Manifest Tool,把 “Input and Output”中的"Embed Manifest" 設定成No,具體操作如圖:
三、問題原因
原因和manifest有關,看到別人的部落格中的解釋:
According to Microsoft's documentation, Mt.exe is "a tool that generates signed files and catalogs". Mt.exe is used in the manifest generation process. If you don't know what a manifest is,
具體翻譯就是:根據微軟的文件,MT.EXE是“生成簽名的檔案和目錄的工具”。 MT.EXE採用的是清單生成過程。如果你不知道什麼是明顯的是,更多的文件解釋說:“manifest 是一個 XML 文件,可以是外部 XML 檔案,也可以是嵌入應用程式或程式集內的資源。isolated application 的清單用於管理該應用程式在執行時應該繫結到的共享並行程式集的名稱和版本。side-by-side assembly 的清單指定該程式集在名稱、版本、資源和其他程式集上的依賴項。“