Category: PackageAnalyzer

NetPackageAnalyzer–part 4–projects analysis

Projects data

Graph for relations between projects in a solution

For the solution it generates the project relations as in a mermaid graph.

Examples

For example, for the solution PackageAnalyzer it generates the following graph:

For the project docFX it generates the following graph:


Building blocks for the solution

Also it generates the building blocks for the solution – you can start from here to understand the solution because those are projects that have not dependencies to other projects.

For the project docFX it generates the following building blocks:

See https://ignatandrei.github.io/PackageAnalyzer/docs/Analysis/NetPackageAnalyzer/BuildingBlocks for the building blocks of the solution PackageAnalyzer.

Root projects

It also generates the projects that are not referenced by other projects . Those are the projects that you can start debugging the solution. See https://ignatandrei.github.io/PackageAnalyzer/docs/Analysis/NetPackageAnalyzer/RootProjects

Test Projects

It will list the test projects of the solution, with their dependencies as graph . See https://ignatandrei.github.io/PackageAnalyzer/docs/Analysis/NetPackageAnalyzer/TestProjects

Data for each project

The tool generates data ( project references, packages, commits ) for each project. See https://ignatandrei.github.io/PackageAnalyzer/docs/category/netpackageanalyzerdocusaurus as an example

NetPackageAnalyzer–part 2- technical details

How it is made

The project is made using the following technologies: – .NET Core local tool for the analysis – Docusaurus for the static site

How the analysis of the solution is made

Gathering data

For getting the packages , it runs the following:

  1. Build the solution with dotnet build

  2. List packages from the solution with dotnet list package –format json
  3. Grab the projects from the packages
  4. List the references for each project with dotnet list project reference
  5. For each project find the commits with git log –date=iso-strict –pretty=”%ad\

Generating files

It has a copy of the Docusaurus site in the resources folder.

In the docs folder of the Docusaurus site it adds a folder with the solutions name and generates( with RazorBlade nuget package) the markdown files for the site.

More details at the source, https://github.com/ignatandrei/PackageAnalyzer/

NetPackageAnalyzer- idea –part 1

I wanted to have a tool that can analyze a C# solution with all the dependencies ( project relations, packages, commits)

It generates a graph of the dependencies for

  • the packages of your solution ( and see when the major version of a package differs between projects)

  • the projects of your solution.
  • the project dependencies of each project.

Along with the graph, it also generates

  • a report for the commits of the solution per years.

  • a report for outdated/deprecated packages per solution.
  • building blocks for the solution – you can start from here to understand the solution

If you want to see how it looks like, you can see how he analyses himself at Analyzer

Andrei Ignat weekly software news(mostly .NET)

* indicates required

Please select all the ways you would like to hear from me:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.