DEV Community

Cover image for Getting Started with NDepend for Visual Studio 2022
Bervianto Leo Pratama
Bervianto Leo Pratama

Posted on

Getting Started with NDepend for Visual Studio 2022

My previous post was about NDepend on Linux and how to utilize the NDepend to check your code quality. Now, I will explain some functions of NDepend for Visual Studio 2022. Let's get started.

Download NDepend & Install the Visual Studio Extension

  1. If you want to use the Trial version or have bought the license, please download here
  2. After downloading and extracting it, please open the VisualNDepend.exe installer.

    File

  3. If you don't have the license yet, press Start Evaluation. If you have the license, please insert into the box after the Activate button and click the Activate button. After activate the license, you may click Continue button.

    Start Evaluation

    Continue

  4. Since I will integrate with Visual Studio. Please select Install Visual Studio Extension button.

    Page

  5. Press Install for Visual Studio 2022. Please wait until the process is successful.

    VS 2022

    Complete

Let's Explore

I will use different code/repositories to explore my code. I will use my old project when I was a Computer Science Student.

GitHub logo berv-uni-project / tweety

Tweety, Twitter Tweet Analyzer

Tweety

Tweety, Twitter Tweet Categorizer. Using KMP and Boyer Moore Algorithm that find matching string.

Build Status

Azure Pipelines Github Action Codecov License Scan Codacy
Build Status Docker codecov FOSSA Status Codacy Badge

Demo & Related Projects

About App

Main Screen

This app build with C# (Based Language for Logic in KMP & Boyer Moore Algorithm) and ASP.NET MVC (v0.1), ASP.NET Core MVC (v0.2).

This app using Twitter API, so you must have token key.

Youtube Review (v0.1) : Youtube Link

Development

  • Setup your Twitter API key in Environment

Deployment

  • You can deploy to Azure (read the documentation) to deploy ASP .NET Core MVC (v0.2 or above).

Use Docker

You can use docker-compose.yml and provide environment like this:

CUSTOMER_KEY=...
CUSTOMER_SECRET=...
TOKEN=...
TOKEN_SECRET=...
Enter fullscreen mode Exit fullscreen mode

Created By

  1. Bervianto Leo Pratama
  2. Jeremia Jason Lasiman
  3. M. Az-zahid Adhitya Silparensi

LICENSE

BSD 3-Clause License

BSD 3-Clause License
Copyright (c) 2018, Bervianto Leo Pratama
All rights reserved.

Redistribution and use in
Enter fullscreen mode Exit fullscreen mode

Dependency Graph

  • I will attach NDepend Project to my project.

    Attach

    Analyze

  • You will get this dialog. Anyway, I will try the Dependency Graph.

    Dialog

    Dependency Graph

    Dependency Graph 2

  • The Dependency Graph is a cool feature. Usually, when I want to know and understand the business flow or class interaction, I need to read the code from the top (controller/etc.). The Dependency Graph really helps me to browse my code easily and interactively.

Code Coverage

  • Since in this project I use Unit Test, so I can explore more the Code Coverage too.

    Dashboard

    Code Metrics View

  • I also can see the visualization of my code coverage. This is cool!

TLDR

So, what do you think? It's awesome, right? Mostly my main job is maintaining the existing code. That is why I'm highlighting the feature of Dependency Graph and Code Metrics View.

Anyway, I'm going to write something about DevOps Extension: Code Quality NDepend for Azure DevOps, TFS 2017 and TFS 2018. So stay tune!

Awesome GIF

Discussion (0)