Use attributes to surface method intent during build
Short answer
B Apply attributes to the methods so the compiler emits their intent as messages in the Output window during the build process.
Question
Several of the classes in the solution are designed to be extended by customers in other implementations to accommodate unique requirements.
Certain methods must show up in the output window during the build process to advise other developers about the intent of the methods.
You need to implement the statements for the methods.
What should you implement?
Key Takeaways
The test is whether you can separate build-time compiler diagnostics from runtime output; only attributes are processed by the compiler during build.
This MB-500 scenario asks how to make method-level guidance appear in Visual Studio's Output window during a Dynamics 365 build. The answer is attributes (B): compiler-processed metadata such as SysObsolete emits build diagnostics, while comments and info() never reach build output.
Common mistake: Comments (A) look like the natural way to describe intent but the compiler ignores them, so they never appear in the build Output window.
Expert Analysis
Trace the request. The requirement is not runtime behaviour but build-time behaviour: statements attached to methods must surface in Visual Studio's Output window while the solution compiles, so that downstream developers extending those methods learn the intended use. That immediately eliminates anything evaluated only when code runs: E info writes to the Infolog at runtime, and C global variables carry data, not developer-facing guidance. D properties are element-level settings (a few of which, like IsDeprecated, can suppress members) but they are not statements you write on a method body to describe intent, and A comments are invisible to the compiler — they never appear in build output.
Where the message is produced. The mechanism that reaches the build log is compiler-processed metadata. An attribute such as [SysObsolete(...)] is applied directly to the method, and when the compiler resolves the method during build it emits a warning/diagnostic into the Output window telling the extending developer the method is deprecated or reserved. The same pattern generalises: a custom attribute consumed by a generator or analyser can emit diagnostics about a method's intent. So the statements you implement are attributes — B.
Why not the tempting distractors. The comments split between those who reach for A (ChatGPT-style answer) and those who argue 'only something the compiler reacts to can put a message in the build output' — which is the decisive reasoning and points to B. One commenter concedes they would 'like to see comments come up in the output window' but agrees it is not A, while another guesses a TODO-style comment; neither survives the requirement that the text appears during the build. E info is the classic wrong pick because it does produce visible output — but only at runtime in the Infolog, not during compilation.
Extension angle. Because customers subclass these classes, attributes travel with the metadata and remain visible to anyone consuming the assembly/source during build, which is exactly the 'advise other developers' intent described.
Exam Strategy
On MB-500, treat the phrase 'during the build process' as a filter: only compiler-processed constructs (attributes, analyzers, generators) can emit into build output, so eliminate runtime calls like info() and ignored constructs like comments before choosing. Then check which option is actually written on a method — that rules out element-level properties and variables.
Frequently Asked Questions
Why don't X++ comments appear in the build Output window?
What is the difference between info() output and an attribute warning?
Can attributes guide customers extending my classes?
Community Votes
80% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 7 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 7
-
globeearth 👍 2 Answered BAttributesare metadata that can be applied to classes, methods, or other elements to provide additional information or behavior. Specific attributes, such as [SysObsolete] or custom attributes, can be used to display messages in the output window during the build process, informing developers about the purpose or status of methods (e.g., whether they are intended for extension or deprecated).
-
smithlaod 👍 2B. attributes Explanation: Attributes in .NET can be used to annotate methods with additional metadata, which can be processed at compile time or run time. You can create a custom attribute that outputs messages during the build process. However, for general purposes, you might also see that certain build systems can utilize attributes to display information in the output window.
-
Ali20 👍 2 Answered AChatGPT: The correct choice to implement statements for methods that should show up in the output window during the build process to advise other developers about the intent of the methods is: A. comments
-
cbef765 👍 1 Answered BThe key phrase is “show up in the output window during the build process”. Only something the compiler reacts to can put a message in the build output, and in X++ that means an attribute.
-
techsupport 👍 1 Answered BThe SysObsolete attribute is used to mark methods as obsolete. During the build process, this attribute will trigger a warning in the output window.
Show 2 more comments
-
cbef765 👍 1Id like to see comments come up in the output window.... it's not A
-
8933e4c 👍 1I agree. I suppose it is simply the well known todo comment.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All MB-500 Questions
Access 115 questions with complete answers and detailed explanations.
View Full MB-500 Practice Test →