Skip to content

Static Code Analysis

Lucki2g edited this page Jan 31, 2026 · 4 revisions

Static Code Analysis

To enable your team & integrators to more easily see dependencies to your team's codebase, we've introduced the static code analysis feature to allow walking trough the code for attribute usages. These dependencies are not visible in the Make portal as understanably Microsoft would not want to store or analyse your code or DLLs.

Tip

Read about the technical limitation at Plugin Analysis

Currently we've only implemented Plugin C# analysis, but expect Azure Function and WebResource analysis in the future. Note, that you can already enable WebResource analysis via WebResource Metatagging, which will be deprecated when the analaysis is moved to the generator.

Setup Plugin Code Analysis

To enable code analysis, you must update your pipelines to version 2.4.0 or newer and configure your pipelines variables.

Name Requirement Description
CodeAnalysis:RepositoryPath Optional Sourcecode repository containing your BusinessLogic. Often form https://dev.azure.com/{organization}/{project}/_git/{repository}
CodeAnalysis:RepositoryBranch Optional Name of branch e.g. master. default: main
CodeAnalysis:Plugin:Enabled Optional Boolean to enable codeanalysis. When enabled the SDK Step registrations from Dataverse metadata is no longer used, but found via static code analysis.
CodeAnalysis:Plugin:XrmContextPath Optional Path to XrmContext.cs generated by XrmContext.
CodeAnalysis:Plugin:PluginProjectPaths Optional Semicomma-seperated paths to root folders for plugin registrations. e.g. Dataverse/Plugin;Plugins
CodeAnalysis:Plugin:LogicPaths Optional Semicomma-seperated paths to root folders for logic. e.g. Dataverse/BusinessLogic;Plugin/Logic;Services
CodeAnalysis:Plugin:PreScriptCommand Optional Command you wish to run pre analysis. This may be if you need to generate Context classes.

Clone this wiki locally