SecAnnotate.exe (.NET Security Annotator 工具)
更新:2011 年 4 月
.NET Security Annotator 工具 (SecAnnotate.exe) 是識別一個或多個組件之 SecurityCritical 和 SecuritySafeCritical 部分的命令列應用程式。
Visual Studio 延伸,Security Annotator,提供 SecAnnotate.exe 的圖形化使用者介面,讓您能夠 Visual Studio 執行該工具。
這個工具會自動隨 Visual Studio 和 Windows SDK 一起安裝。 若要執行工具,建議您使用 Visual Studio 命令提示字元或 Windows SDK 命令提示字元。 這些公司可讓您輕鬆地執行工具,而不需瀏覽至安裝資料夾。 如需詳細資訊,請參閱Visual Studio 和 Windows SDK 命令提示字元。
如果您已經在電腦上安裝 Visual Studio:在工作列上,依序按一下 Start、All Programs、Visual Studio、Visual Studio Tools,然後按一下 Visual Studio Command Prompt。
-或-
如果您已經在電腦上安裝 Windows SDK:在工作列上,依序按一下 Start、All Programs、Windows SDK 的資料夾,然後按一下Command Prompt(或 CMD Shell)。
在命令提示符號下鍵入以下內容,其中下一節會描述 parameters,而 assemblies則包含以空格分隔的一個或多個組件名稱:
SecAnnotate.exe [parameters] [assemblies]
參數
選項 |
描述 |
---|---|
/a 或 /showstatistics |
顯示要分析之組件中有關透明度使用的統計資料。 |
/d:directory 或 /referencedir:directory |
指定要在註釋期間搜尋相依組件的目錄。 |
/i 或 /includesignatures |
在註釋報告檔中包含延伸的簽章資訊。 |
/n 或 /nogac |
隱藏搜尋全域組件快取中的參考組件。 |
/o:output.xml 或 /out:output.xml |
指定輸出註釋檔。 |
/p:maxpasses 或 /maximumpasses:maxpasses |
指定停止產生新註釋前,傳遞組件註釋的數目上限。 |
/q 或 /quiet |
指定無訊息模式,在此模式中,標註工具不會輸出狀態訊息,只會輸出錯誤訊息。 |
/r:assembly 或 /referenceassembly:assembly |
在註釋期間解析相依組件時,包含指定的組件。 參考組件的優先順序高於參考路徑中的組件。 |
/s:rulename 或 /suppressrule:rulename |
隱藏執行輸入組件上的指定透明度規則。 |
/t 或 /forcetransparent |
強制 Annotator 工具將所有不具透明附註的組件視為完全透明。 |
/v 或 /verify |
僅驗證組件的註釋都是正確的,如果組件不驗證,不會嘗試多次傳遞尋找所有必要的註釋。 |
/x 或 /verbose |
指定加註註釋時的詳細輸出。 |
/y:directory 或 /symbolpath:directory |
在註釋期間搜尋符號檔案時,包含指定的目錄。 |
備註
在命令列指定且前面加上一個 at 符號 (@) 的回應檔也可能會提供參數和組件。 回應檔中的每一行應該包含單一參數或組件名稱。
如需關於 .NET Security Annotator 的詳細資訊,請參閱 .NET Security 部落格中的項 Using SecAnnotate to Analyze Your Assemblies for Transparency Violations
變更記錄
日期 |
記錄 |
原因 |
---|---|---|
2011 年 4 月 |
加入使用 Visual Studio 和 Windows SDK 命令提示字元的相關資訊。 |
資訊加強。 |
2010 年 7 月 |
新增連結至Security Annotator。 |
資訊加強。 |