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 939509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:48:08+00:00 2026-05-15T21:48:08+00:00

We are seeing extremely strange results where StyleCop will correctly report violations when run

  • 0

We are seeing extremely strange results where StyleCop will correctly report violations when run from within Visual Studio 2010. However, when we run msbuild on the command line (e.g., “MSBuild.exe mySolution.sln”) it reports “No violations encountered” when clearly there are the same violations as when we ran it within Visual Studio. Is this a bug in the latest release of StyleCop? Or in the 2010 integration? Is there anything you can tell me about possible differences with StyleCop executing from within VS.NET versus MSBuild command line? Thanks.

  • 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-15T21:48:09+00:00Added an answer on May 15, 2026 at 9:48 pm

    I figured out the problem to my own question. The setup for this was that, inside our csproj file, we had this:

    <Import Project="..\..\lib\StyleCop\Microsoft.StyleCop.targets" />
    

    which is a slight difference from what Microsoft shows here where they do this:

    <Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.3\Microsoft.StyleCop.targets" />
    

    But everything should still work. The problem was that in our lib\StyleCop folder, we only had:

    • Microsoft.StyleCop.Targets
    • Microsoft.StyleCop.dll

    We were missing:

    • Microsoft.StyleCop.CSharp.dll
    • Microsoft.StyleCop.CSharp.Rules.dll

    which are dynamically discovered. Once we added those 2 other files to our lib\StyleCop folder, now everything is working fine from MSBuild. This enables us to be able to utilize StyleCop without every developer running the installer to put the binaries in the ProgramFiles directory. This also means we don’t have to run the installer on the build server.

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

Sidebar

Related Questions

Seeing some strange things; help is being solicited. I have a query, like so:
Seeing some strange behavior, whereby connecting to Oracle database, and then calling external function,
I've been seeing some strange issues using the Alarm manager in Android, despite the
Seeing something strange between a Java web service and the .NET client talking to
seeing that applications created with QT claims to run on all platforms, windows, linux,
I have an asp.net web application that I made in Visual Studio 2008. Everything
Seeing this thread I wrote the following: How do I convert from void *
Given the extremely high requirements for unpredictability to prevent casinos from going bankrupt, what
Seeing various locking related question and (almost) always finding the 'loop because of spurious
Seeing lots of SOAP/RDS stuff, but just want to dump some MySQL data and/or

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.