Category: PackageAnalyzer

NetPackageAnalyzer and dotnet-starter-kit

I have analyzed  https://github.com/fullstackhero/dotnet-starter-kit  with https://nuget.org/packages/netpackageanalyzerconsole . It seems to be simplitic , even if it has the migrations for different database ( I do not have had this case )

Number projects : 11 (tests : 1, no tests : 10 )

Number packages : 346 (Outdated: 64, Deprecated: 5, Major version differs 5 )

Total Commits: 644 ( last commit : 2023)

10 Projects

diagram

644 commits

diagram

Generated by https://www.nuget.org/packages/NetPackageAnalyzerConsole

NetPackageAnalyzer and eshop

I have analyzed  https://github.com/dotnet/eShop with https://nuget.org/packages/netpackageanalyzerconsole . It seems one of the good projects to be analyzed from an architecture summary

Number projects : 25 (tests : 5, no tests : 20 )

Number packages : 409 (Outdated: 24, Deprecated: 0, Major version differs 28 )

Total Commits: 193 ( last commit : this year,2024)

20 Projects

diagram

193 commits

diagram

Generated by https://www.nuget.org/packages/NetPackageAnalyzerConsole

NetPackageAnalyzer–part 6–Commits

Commit data for all time for the solution

You can see the commits for all time for the solution.


Commit data history for each project / folder

You can see the commits for all time for the solution.

And for each year since the beginning of the solution, you can see the commits.

Commit data for each project

You can see the commits for each project.

See https://ignatandrei.github.io/PackageAnalyzer/docs/Analysis/NetPackageAnalyzer/Projects/NetPackageAnalyzerConsole/Commits

Most Commits per file
You can see the commits for each file.

See https://ignatandrei.github.io/PackageAnalyzer/docs/Analysis/NetPackageAnalyzer/summary

Commits with most files per year
You can see the commits with most files per year.

See https://ignatandrei.github.io/PackageAnalyzer/docs/Analysis/NetPackageAnalyzer/summary

Commits with max files
You can see the commits with max files.

See https://ignatandrei.github.io/PackageAnalyzer/docs/Analysis/NetPackageAnalyzer/summary

NetPackageAnalyzer–part 5- packages

List of packages

For the solution it generates list of packages from each project and also shows when are differences between the major versions of the packages.

Example docFx

For the solution docFx it generates the following:

Number of packages : 154

Packages with more than 1 version: 30 ( 19 % from total packages)

Number of packages with major version differs: 28


Example PackageAnalyzer

For the solution PackageAnalyzer please look at https://ignatandrei.github.io/PackageAnalyzer/docs/Analysis/NetPackageAnalyzer/DisplayAllVersions

Outdated or deprecated packages

It also show the packages that are deprecated or outdated – see https://ignatandrei.github.io/PackageAnalyzer/docs/Analysis/NetPackageAnalyzer/DisplayOutdatedDeprecated

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.