A prototype of a tool and an extensible API for the visualization of C# codebases.
dotnet tool install --global helveg
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.
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.
- .NET 7.0 or newer
- Node 22.4.0 or newer
- an up-to-date web browser
- git (optional)
To build Helveg from its source code, do the following:
- Make sure you have installed the prerequisites listed above.
- Make sure your computer is connected to the internet.
- Open a command-line or a terminal in the root of the repository.
- Restore .NET tools:
dotnet tool restore
- Enable
corepack
(Node's manager of package managers):corepack enable
- Install the
pnpm
package manager:corepack prepare pnpm@latest --activate
- Install client dependencies:
pnpm install
- Build client scripts:
pnpm run build
- Pack the .NET solution:
dotnet pack Helveg.sln -o artifacts -c Release
- Make sure no prior version of Helveg is installed:
dotnet tool uninstall --global helveg
- Install the newly built Helveg:
dotnet tool install --global --add-source "./artifacts" --version "0.0.0-local" helveg
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:
- Set the version string in
package.json
files:pnpm run git-version
- Build client scripts:
pnpm run build
- Pack the .NET solution:
dotnet pack Helveg.sln -o artifacts -c Release -p:AllowGitVersion=true
- Make sure no prior version of Helveg is installed:
dotnet tool uninstall --global helveg
- Look into the
./artifacts
directory and make note of<version>
in the filenames. For example inhelveg.42.0.0-answer.nupkg
,<version>
is42.0.0-answer
. - Install the newly built Helveg:
dotnet tool install --global --add-source "./artifacts" --version "<version>" helveg
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
- The source code is licensed under the BSD 3-Clause License.
- Visual Studio Icons in
./packages/helveg-diagram/icons/vs
are licensed under the Visual Studio Image Library License, allowing their use in applications. - The NuGet icon in
./packages/helveg-diagram/icons/nuget/NuGet.svg
is licensed under the CC-BY License. Also see https://github.com/NuGet/Media. - The ingredients used in the CodePizza feature are based on a number of royalty-free images. A complete list can be found in ~/docs/codepizza.md.