Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6948179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:47:18+00:00 2026-05-27T13:47:18+00:00

I am very new to MSBuild and it is taking me a little while

  • 0

I am very new to MSBuild and it is taking me a little while to work out how to do things.

So I am trying to integrate FxCop into my project to be automatically run when I build them on the build server.

At the moment the way to go seems to be to add a custom task to the build that you call when you build. So I have so far created the following:

<Target Name="ExecuteFxCop">
  <ItemGroup>
    <Files Include="bin\XXXX.dll" />
  </ItemGroup>
  <!-- Call the task using a collection of files and all default rules -->
  <MSBuild.ExtensionPack.CodeQuality.FxCop 
  TaskAction="Analyse" 
  Files="@(Files)" 
  SearchGac="True"
  OutputFile="FxCopReport.xml">
  </MSBuild.ExtensionPack.CodeQuality.FxCop>
</Target>

However when I run this >msbuild XXXX.csproj /t:ExecuteFxCop it fails with error 512 which I have narrowed down to an exception from indirectly-referenced assemblys:

<Exception Keyword="CA0060" Kind="Engine" TreatAsWarning="True">
  <Type>Microsoft.FxCop.Sdk.FxCopException</Type>
  <ExceptionMessage>The indirectly-referenced Silverlight assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' could not be found. This assembly is not required for analysis, however, analysis results could be incomplete. Silverlight reference assemblies should be specified with the '/reference' switch. This assembly was referenced by: XXX\bin\ESRI.ArcGIS.Client.dll.</ExceptionMessage>
</Exception>

But I cannot add this reference. Is there a way to get the build to see this reference or preferably just disable the error altogether?

I did try: http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/c6780439-bc04-459e-80c3-d1712b2f5456/ but it doesn’t work

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:47:18+00:00Added an answer on May 27, 2026 at 1:47 pm

    Try the work-around here: http://geekswithblogs.net/blachniet/archive/2011/07/12/avoiding-fxcop-warning-ca0060.aspx

    Edit

    For example, using the FxCop MsBuild task, set ContinueOnError and check the ExitCode as follows:

    <Target Name="ExecuteFxCop">
      <ItemGroup>
        <Files Include="bin\XXXX.dll" />
      </ItemGroup>
      <!-- Call the task using a collection of files and all default rules -->
      <MSBuild.ExtensionPack.CodeQuality.FxCop 
      TaskAction="Analyse" 
      Files="@(Files)" 
      SearchGac="True"
      OutputFile="FxCopReport.xml"
      ContinueOnError="WarnAndContinue">
        <Output TaskParameter="ExitCode" PropertyName="ExitCode"/>
      </MSBuild.ExtensionPack.CodeQuality.FxCop>
    
      <Error Condition="$(ExitCode) != 512" Text="FxCop failed with exit code: $(ExitCode)"/>
    
    </Target>
    

    P.S. (This is not tested)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm very new to MSBuild and am having trouble figuring out how to construct
Very new to JQuery and MVC and webdevelopment over all. I'm now trying to
Very new mobile developer here... I am trying to retrieve a list of tweets
Im very new in C++ I have found this post http://msdn.microsoft.com/en-us/magazine/cc163486.aspx and trying to
Very new to PHP5 and have some problems still. I figured out how to
Very new to Iphone development here, I have a project which is successfully building
Very new to python, trying this - def newlines(): print() print() print() question =
I am very new to writing Build Script. I am trying to understand the
Very new to ruby on rails and trying to get my first ajax call
I am very new to MSBuild. I am attempting two different paths toward a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.