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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:18:30+00:00 2026-06-13T23:18:30+00:00

I’ve got my C# project file set up to import a StyleCop.Targets project that

  • 0

I’ve got my C# project file set up to import a StyleCop.Targets project that runs all the StyleCop rules on build. This is great and I’ve got the project down to zero errors when compiling through Visual Studio.

However when I compile through MSBuild (on the same machine) I get errors along the line of :

The documentation text within the constructor's summary tag must begin with the text: Initializes a new instance of the <see cref="MyClass" /> class.

Focus on the ‘Z’ in initialises… I’ve configured my Settings.StyleCop with an en-GB global setting so that I don’t get errors about Americanisms within the code. However I can’t fathom out why this causes errors in MSBuild.

I know MSBuild is using the same Settings.StyleCop file as if I change a rule (say TabsMustNotBeUsed) MSBuild (and Visual Studio) picks this change up and throws errors all over the place.

I am using StyleCop 4.7, Visual Studio 2012 and MSBuild 4.

Here is a snippet of my Settings.StyleCop file :

<StyleCopSettings Version="105">
  <GlobalSettings>
    <StringProperty Name="Culture">en-GB</StringProperty>
  </GlobalSettings>
  <Parsers>
    <Parser ParserId="StyleCop.CSharp.CsParser">
      <ParserSettings>
        <BooleanProperty Name="AnalyzeDesignerFiles">False</BooleanProperty>
      </ParserSettings>
    </Parser>
  </Parsers>
  <Analyzers>
    <Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
      <Rules>
        <Rule Name="TabsMustNotBeUsed">
          <RuleSettings>
            <BooleanProperty Name="Enabled">False</BooleanProperty>
          </RuleSettings>
        </Rule>
      </Rules>
      <AnalyzerSettings />
    </Analyzer>
  </Analyzers>
</StyleCopSettings>

Any clues ?

Cheers!

  • 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-06-13T23:18:31+00:00Added an answer on June 13, 2026 at 11:18 pm

    I’m assuming you’re using the latest version of StyleCop (4.7.41.0) or a version close to that. There have been a lot of changes and fixes in the 4.7 version line, and there have been fairly regular updates released.

    I’m guessing that there must be another Settings.StyleCop file lower down (in a sub-folder) in the folder hierarchy that is setting the culture back to en-US. Modifying other rules in this particular settings file (like TabsMustNotBeUsed) will still behave as expected as long as you’re not setting it again in the other settings file. A potential cause could be the working folder that StyleCop is being run from.

    I suggest doing a quick scan in your file system to see if you can find any other settings files, and if found, check their culture setting.

    Another trick I’ve done is to stop merging in settings files at the solution root. This can be done by adding the following setting:

    <GlobalSettings>
        <StringProperty Name="MergeSettingsFiles">NoMerge</StringProperty>
    </GlobalSettings>
    

    This will ensure that StyleCop acts the same on all development and build machines, regardless of the settings configured higher up the hierarchy (such as the one in the StyleCop application folder). However if you do this, make sure you copy all the required settings from the files no longer being merged. From your description I doubt that this will solve this particular problem, but I have found it useful to help retain rule consistency.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I've got a string that has curly quotes in it. I'd like to replace
I know there's a lot of other questions out there that deal with this
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text

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.