Skip to content
/ helveg Public

A public issue tracker and a mirror of https://gitlab.com/helveg/helveg, an extensible software visualization tool.

License

Notifications You must be signed in to change notification settings

cafour/helveg

Repository files navigation

Helveg

A prototype of a tool and an extensible API for the visualization of C# codebases.

Installing

dotnet tool install --global helveg

Usage

To produce a diagram of a codebase, navigate into a directory with a Visual Studio Solution file or a MSBuild C# project file and run:

helveg

Alternatively, to produce a diagram of a solution in C:\dev\my-code\MyCode.sln, run:

helveg 'C:\dev\my-code\MyCode.sln'

For a complete list of command-line options, see:

helveg --help

Note: If you don't have any C# codebase at hand, run Helveg on itself or on one of the simple samples in the ./samples directory.

Upon completion, Helveg produces a single .html file. This file contains the interactive diagram. Open it in an up-to-date browser. For information on how to use the user interface, see supplementary_meterial.pdf or the Help panel (denoted by an encircled question mark) within the interface itself.

Limitations

The visualized codebase must be able to build using dotnet build. Codebases relying on .NET Core and .NET 5+ should be fine. However, you may encounter issues when visualizing projects relying on the old .NET Framework, such as old-style ASP.NET projects and WPF applications.

Building

Prerequisites

  • .NET 7.0 or newer
  • Node 22.4.0 or newer
  • an up-to-date web browser
  • git (optional)

Steps

To build Helveg from its source code, do the following:

  1. Make sure you have installed the prerequisites listed above.
  2. Make sure your computer is connected to the internet.
  3. Open a command-line or a terminal in the root of the repository.
  4. Restore .NET tools:
    dotnet tool restore
  5. Enable corepack (Node's manager of package managers):
    corepack enable
  6. Install the pnpm package manager:
    corepack prepare pnpm@latest --activate
  7. Install client dependencies:
    pnpm install
  8. Build client scripts:
    pnpm run build
  9. Pack the .NET solution:
    dotnet pack Helveg.sln -o artifacts -c Release
  10. Make sure no prior version of Helveg is installed:
    dotnet tool uninstall --global helveg
  11. Install the newly built Helveg:
    dotnet tool install --global --add-source "./artifacts" --version "0.0.0-local" helveg

About version strings

This repository uses GitVersion to produce NuGet packages with correct semantic version strings. If you obtained Helveg's code repository without its history (i.e. the .git folder), you won't be able to use GitVersion and all packages will have the 0.0.0-local fallback version.

If the .git directory is present and you have git installed on your computer, you can generate NuGet packages with correct version strings by following steps 1. - 7. as above and then the following:

  1. Set the version string in package.json files:
    pnpm run git-version
  2. Build client scripts:
    pnpm run build
  3. Pack the .NET solution:
    dotnet pack Helveg.sln -o artifacts -c Release -p:AllowGitVersion=true
  4. Make sure no prior version of Helveg is installed:
    dotnet tool uninstall --global helveg
  5. Look into the ./artifacts directory and make note of <version> in the filenames. For example in helveg.42.0.0-answer.nupkg, <version> is 42.0.0-answer.
  6. Install the newly built Helveg:
    dotnet tool install --global --add-source "./artifacts" --version "<version>" helveg

Dependencies

This software has many dependencies. You do not need to install these explicitly. See Build Instructions above. These are the most significant dependencies:

Back-end

Front-end

License