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

  • Home
  • SEARCH
  • 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 747993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:16:08+00:00 2026-05-14T14:16:08+00:00

I have turned on Treat warnings as errors for my VS project which mean

  • 0

I have turned on “Treat warnings as errors” for my VS project which mean that I get errors for missing documentation (nice reminder for this particular project).

However, part of the code is generated by a custom tool which does not insert xml documentation so I’m looking for away to ignore the missing xml documentation for the generated code only, not for the entire project. I have no influence on the actual file generated and cannot really insert anything in the file (as it is regenerated frequently by the tool) so I looking for something existing outside the generated file (the classes that are generated are partial, if that helps)

  • 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-14T14:16:08+00:00Added an answer on May 14, 2026 at 2:16 pm

    EDIT: See comments indicating that this doesn’t work with C# 4. I’m not clear whether it worked in earlier versions of the compiler. The C# 4 spec makes this pretty clear though. Section 2.5.8.1 states:

    A #pragma warning restore directive restores all or the given set of warnings to the state that was in effect at the beginning of the compilation unit. Note that if a particular warning was disabled externally, a #pragma warning restore (whether for all or the specified warning) will not re-enable that warning.

    Jeff has a workaround in a blog post – basically to reprocess autogenerated code as part of the build.


    As Tom says, you can add an “ignore” to the whole project (Build / Suppress Warnings – enter 1591 as the warning number) – but then you can restore the warning yourself at the top of each of your non-generated files:

    #pragma warning restore 1591
    

    It’s pretty ugly, but it works (I’ve just tested it).

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

Sidebar

Related Questions

I code with treat warnings as errors turned on and XML Documentation turned on.
I have a treeview control in a Windows Forms project that has checkboxes turned
I have turned on warnings as errors and now i need to XML comment
I have a project that adds elements to an AutoCad drawing. I noticed that
CFMX 8 Enterprise I have turned on the Use J2EE session variables setting under
I have got the following problem since the server has safe mode turned on,
I have switched to Vista recently and I wanted to keep UAC turned on,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have a big fat query that's written dynamically to integrate some data. Basically
I have an odd reoccurring error that I believe is related to View State

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.