3

I have enabled the following xmlDoc setting in my projec.json file:

"buildOptions": {
  "xmlDoc": true
}

I only want to comment some of my MVC Controllers to support Swashbuckle and I get lots of warnings complaining that the rest of my code is uncommented. Is there some way of only turning on this setting in Release mode?

venerik
  • 5,766
  • 2
  • 33
  • 43
Muhammad Rehan Saeed
  • 35,627
  • 39
  • 202
  • 311

2 Answers2

4

Yes, you can enable XML documentation only in Release mode, by adding the following to your project.json:

"configurations": {
  "Release": {
    "buildOptions": {
      "xmlDoc": true
    }
  }
},

Another option would be be to completely ignore that warning, by adding "nowarn": ["CS1591"] to "buildOptions".

svick
  • 236,525
  • 50
  • 385
  • 514
2
"buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true,
    "xmlDoc": true,
    "nowarn": [ "CS1591" ]
},
Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • 2
    It would be good if you could give a short sentence explaining why this works (and what exactly that does). Keep in mind that a lot of other people might read that as well. – Seb Nov 28 '16 at 16:43