web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Treat best practice warnings as error

(0) ShareShare
ReportReport
Posted on by 20

Hi all

is it posible to treat best practice deviations as compiler error so the developer must fix his issues? We did it for our team in the past having a global ruleset for all developers when we writing .net code. I want to have a global ruleset for every developer in our team. I'm now reworking the whole solution/model because developers forget to assign labels or using deprecated functions... I think it's more Visual Studio related question... Did someone have some experience with that?

I have the same question (0)
  • Suggested answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    Hello Dirk,

    It's always a good thing to enforce best practices in the early dev stage.  I believe you can utilize the Code Analysis feature in Visual Studio which has Microsoft recommended rules as well as you can create your own.

    You can also use ReSharper as well for code analysis and

    learn.microsoft.com/.../how-to-configure-code-analysis-for-a-managed-code-project

    learn.microsoft.com/.../how-to-create-a-custom-rule-set

  • Martin Dráb Profile Picture
    238,795 Most Valuable Professional on at

    Which kind of development are you talking about? Isn't it about X++? Please note that you're asking in the generic D365 forum, therefore we can't know if you mean BC, CE, F&O or some other related development.

  • dklimke Profile Picture
    20 on at

    Sorry, i'm talking about Dynamics 365 F&O, Visual Studio 2019 Prof.

  • Martin Dráb Profile Picture
    238,795 Most Valuable Professional on at

    Moved to Dynamics 365 Finance Forum.

    If you use gated check-ins, that's the obvious place where to do it. And if you don't, consider if it isn't the right appoach, before you start building anything special in Visual Studio.

    Personally, I work on a huge project with a legacy codebase with many warnings and my gated builds merely dump information about BP to an Azure table, so I can easily see how things are changing, and I can intervene. But I could also fail the build if the number of violations doesn't meet certain criteria.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 521 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 438

#3
Adis Profile Picture

Adis 261 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans