Improve your .NET Apps Quality with these technologies
Eduardo Fonseca
Founder | Entrepreneur | Blazor Developer | Software Architect | .NET & Azure Expert | Cloud Architect | Creator of FairPlayTube | Software Engineer | Author | Digital Content Creator | Game Developer | Tech Innovator
Hello, I hope you are doing great!!!
Today, we are going to discuss how you can improve your ".NET Software Quality", however, before we begin, please remember you can help us help you by becoming a GitHub Sponsor here: Sponsor @efonsecab on GitHub Sponsors
Let's start.
One of the first things you should do in order to improve your ".NET Software Quality" is to "Treat warnings as errors", you can do that by using the project's properties page withing Visual Studio or by manually editing the ".csproj" file.
That will help you keep the Warnings tab clean.
The best thing is to target having "0 Errors", "0 Warnings", "0 Messages".
Something additional you should do to each project is adding the "Sonar Analyzer NuGet package".
Once you have the package added, you should start frequently running "Code Analysis", and take actions on the results.
One more step you should do is to include a ".editorconfig" file in the Visual Studio solution, this file will take precedence over the Visual Studio configuration which can be different among users, this file effectively makes it so that every single user using the Visual Studio solutions executes the same rules, for styling, naming, and even Analyzers.
Another thing you should do is to have your projects in a GitHub repository, and then include it in SonarCloud, and why not having the main statuses displayed in your README.
SonarCloud does an amazing job with "Code Analysis" and giving you recommendations on how to improve your code.
领英推荐
Your main goal should be having everything in green!!!
In order to learn more about "Code Analysis" check its official documentation, there you will also learn how to Suppress certain code analysis violations when you may think is the best to suppress them, however, be careful with it, try to avoid it as much as possible.
One more thing you should do, is to integrate your solution with ".NET Aspire", since it helps you a lot by easily configuring "Open Telemetry" and includes a Dashboard for when in local Development, this Dashboard, helps you track actions being performed, queries being executed along with their duration, as well as metrics.
I hope this article has been helpful to you, please help us reaching more persons by sharing it in your Social Networks.
Have a great day, and don't forget to Sponsor @efonsecab on GitHub Sponsors