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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Static Code Analyzer Tool to check Best Practices in D365

(0) ShareShare
ReportReport
Posted on by 80

Hi,

I need to know if there is any Best Practices Tool Analyzer for D365 project like Like Sonar(Java)/Resharper(C#). It was available till Visual Studio 2010.

My scenario is as follows:

As Visual studio provide Best Practices checkbox under Dynamics 365 file menu in Visual Studio 2015. But as we all know that any developer can uncheck that and build solution without solving Best Practices checks first.  If that developer afterwards check In code into VSTS he won't be held responsible. 

I need one of following solutions if feasible to handle above probelm:

  1.  While checking in into VSTS we somehow enable Best Practices check from Visual studio automatically or with the help of some script.
  2.  We make C# or any other VS compatible solution that enable Best Practices checkbox whenever developer try to build the application. 

    Any help or info on this will be highly appreciated. 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    Automated builds are the best place for this kind of things.

  • Salman Pervaiz Profile Picture
    80 on at

    Martin,

    - How can we achieve that in our current scenario?

    Regards

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    Can you explain your problem, please? Does it mean that you don't know what automated builds are, or how to deploy a build server, or how to configure BP checks there, or what?

  • Salman Pervaiz Profile Picture
    80 on at

    - How to configure BP checks if Developer uncheck them from Visual studio file menu.

    Actually i need a mechanism to check Best practices rules in D365 projects if ignored by developer while uploading or after into VSTS/TFS.

    - How does automated build fit in for D365 projects?

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    I think you should first ask where and when would you run the check, not how to configure it. And the best answer, in my opinion, is "on the building when running automated builds". Do you have any other idea?

    Automated builds fit into D365 projects in the same way as to any other software projects. They take code developed by different people, integrate it together, make sure it all compiles and they may perform other verification steps, such as static analysis and regression testing.

  • Salman Pervaiz Profile Picture
    80 on at

    - What if i want to run the check (BP) on build in Visual Studio? Can i do that?

    - Well explained for D365 its use, but will it generate report and highlight issues against each developer work done on performing static code analysis and BP check?

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    Sure, you can have a developer downloading all code from VSTS to a developer machine and running a build it in Visual Studio with BP checks enabled. I thought from your question that you already knew this. The obvious disadvantage is somebody must spend time doing it.

    Yes, you'll see build results in VSTS. I suggest you read a little bit about this topic, deploy a build server, run a few builds and see how it works for yourself. The fact automated builds aren't used on your project is a problem that you should fix ASAP anyway.

  • Vilmos Kintera Profile Picture
    46,149 on at

    Check the documentation about build and test automation, it is very detailed. You may find other relevant pages too if you use Search within the documentation.

    [View:https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/perf-test/continuous-build-test-automation:750:50]

    It highlights issues against all check-ins to the VSTS repository/branch that your developers are working against, since they all land in the same application ultimately. That is what build servers are used for, as Martin explained above.

  • Salman Pervaiz Profile Picture
    80 on at

    Thank you Martin for you time really appreciate that.

    I am looking into automated builds as suggested by you and will revert back with my findings w.r.t current problem.

  • Salman Pervaiz Profile Picture
    80 on at

    Thank you Vilmos for link. I am looking into it and will get back to you with query if any.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans