Search code examples
asp.net-coreasp.net-core-mvc.net-corexml-documentationproject.json

Project.json Settings Based on Solution Configuration


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?


Solution

  • "buildOptions": {
        "emitEntryPoint": true,
        "preserveCompilationContext": true,
        "xmlDoc": true,
        "nowarn": [ "CS1591" ]
    },