Welcome to MSDN Blogs Sign in | Join | Help

Q: Why does the RunFxCop task fail when I run MSBuild from the command line?

A: When you build from the command line, the build report may contain an error for the RunFxCop task that says, "The system cannot find the path specified." This is a known problem that is fixed in later releases. It occurs because the environment variable, FxCopDir, was not defined in this release. As a workaround, you can do one of the following:

  • Add the Environment Variable:

  1. In Control Panel, open System.  The System Properties dialog box appears.
  2. Click the Advanced tab, and then click Environment Variables. The Environment Variables dialog box appears.
  3. Under System variables, click New. The New System Variable dialog box appears.
  4. In the Variable name box, type FxCopDir.
  5. In the Variable value box, type (path), and then click OK.
  • Or, use MSBuild's /p command-line switch to provide the full path for FxCop:

msbuild /p:FxCopDir="C:\Program Files\Microsoft Visual Studio 8\Enterprise Developer Tools\Static Analysis Tools\FxCop"

Applicability: Visual Studio 2005 Beta 1 Refresh with Visual Studio 2005 Team System

Published Thursday, September 16, 2004 6:31 PM by AskBurton
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# New Team System Stuff - 2004-09-16

Friday, September 17, 2004 3:53 AM by Rob Caron's Blog

# physiognomy Hamburg

Thursday, January 25, 2007 5:18 AM by physiognomy Hamburg

Innovation and integration across the entire application development life cycle

I do not agree. Go to http://www.businesstrades.info/transform_Germany/osprey_Hamburg/physiognomy_Hamburg_1.html

# intelligibility London

Wednesday, March 28, 2007 9:01 AM by intelligibility London

Innovation and integration across the entire application development life cycle

I do not agree. Go to http://www.getjobz.info/ejaculation_United%20Kingdom/sere_England/intelligibility_London_1.html

# re: Q: Why does the RunFxCop task fail when I run MSBuild from the command line?

Monday, February 18, 2008 6:17 PM by Duy Nguyen

I am having the same issue and I tried putting this environment System variables on my local PC, which has VSTS for Developers (2005). It did not work. I have also set the environment System variables on my TFS Server with no sucess. Any other suggestions what what is wrong?

# Visual Studio Team System Q Why does the RunFxCop task fail when I | Paid Surveys

# re: Q: Why does the RunFxCop task fail when I run MSBuild from the command line?

Monday, August 03, 2009 5:21 AM by チェッカー

あなたの真のH度を診断できるHチェッカー!コンパや飲み会で盛り上がること間違いなしのおもしろツールでみんなと盛り上がろう

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker