1

I've currently set up a environment for learning Microsoft Dynamics 365. While I am playing around with code, I am getting a million warnings about missing documentation.

As:

  1. I am a strong believer in "Clean Code"; and
  2. I especially don't want to document all these things while just messing about to learn; and
  3. I want visibility of other warnings which may be more important or at least interesting; and
  4. I prefer explicit code.

I want to suppress all the warnings and always include the "public" keyword by default for all my classes.

So, I want to change the template from:

class AssetConsistencyCheck
{
}

to

[SuppressBPWarning("BPXmlDocNoDocumentationComments", "Prefer clean code!")]
public class AssetConsistencyCheck
{
}

Is this possible, and if so how?

Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71
Brian Kessler
  • 2,187
  • 6
  • 28
  • 58
  • 1
    You could create a code snippet, see for example http://kashperuk.blogspot.com/2016/09/development-tools-editor-scripts-in.html – FH-Inway Jun 24 '21 at 11:30
  • 1
    You can disable best practices (BP's) such as the need for documentation on a per model basis. Setup is found in Visual Studio under `menu Dynamics 365 > Options... > Best practices` > select your model in the top right drop down > uncheck the relevant documentation BP rules under `Microsoft.Dynamics.AX.Framework.CodeStyleRules > XmlDocumentationRules`. – Sander Jun 25 '21 at 20:06
  • @Sander , I tried unchecking the rules, but it did not seem to work. Anyway, I still want to know how to create a template. ;-) – Brian Kessler Jun 26 '21 at 20:59

0 Answers0