现在的位置: 首页 > 综合 > 正文

How to change the timeout in FXCop

2013年04月22日 ⁄ 综合 ⁄ 共 996字 ⁄ 字号 评论关闭

Q

Since I am using DevExpress, the target assembly takes a long time to analyze. I have to supress the deadlock warning several times before getting the report.

Also, the console version FxCopCmd.exe has more patience but I have no way to tell it to wait longer, as I did in the GUI version. So it just tell me the thread is aborted.

Is there a registry entry or config file to change this timeout setting?

 

You can modify the deadlock timeout by either modifying the project (both the UI and command-line will honour this) or explicitly using the via the command-line:

Modifying the project:

  1. Open your FxCop project in a text editor
  2. Add the DeadlockDetectionTimeout element, replacing 120 with the number of seconds you want to change the timeout to:

     <ProjectOptions>
      [...]
      <SearchGlobalAssemblyCache>False</SearchGlobalAssemblyCache>
      <DeadlockDetectionTimeout>120</DeadlockDetectionTimeout>
     </ProjectOptions>

Via the command-line:

  1. Passing the /timeout switch, with its value set to the number of seconds you want to change the timeout to (note the default is 120 seconds):

    fxcopcmd /file:MyAssembly.dll /out:report.xml /timeout:120

Regards

David M. Kean - MSFT

抱歉!评论已关闭.