Skip to content

How to build the toolset from source

Natalie Howes edited this page Oct 15, 2023 · 17 revisions

Building the toolset from source code is very easy using Visual Studio. You don't have to be a programmer to know how to build the project from source. You might want to build the project from source to learn how the inside of the toolset works, to see if you can trigger an issue and give us a more detailed report of an issue, or to get access to the absolute latest features.

Get Visual Studio 2022 and .NET 7.0 SDK

You will need Visual Studio 2022 or newer to build the project. Older versions will not work. Community Edition is free and can be downloaded from here.

You will also need the .NET 7.0 SDK. This will allow you to build the software. You can download the developer pack from the SDK download page. From this page you can also download and install .NET 7.0 Runtime, if you don't already have that installed.

Install Visual Studio 2022

Running the installer will allow you to choose several options. Ensure you select at least the C# .NET development and C++ development options. Installer UI

You may also want to install the GitHub Extension for Visual Studio, which is really useful, especially if you want to contribute. You can find it on the Individual components page. Github VS

Once you have installed Visual Studio, you may need a restart. Choose Dark theme when it asks.

Open project in Visual Studio

You are now ready to import the code and build the project. Go to the repository and go to Clone, and then select Open with Visual Studio.

How to open in VS

Once Visual studio opens up, the Team Explorer panel will open. This panel is how you will fetch the latest code from within Visual Studio. In this panel, you will see a Clone button appear under Local Git Repositories.

Git repo

Select where you want the project to be placed, and then click Clone. It will download the git repository to your system.

Git Downloading

Once the repository has downloaded, Visual Studio will open the directory for the project. You need to load the .sln file, which is the Solution file. The solution file contains all of the information about a set of projects. Before you do that, you will need to also download our submodules, which are our forks of other projects that we also use but keep separate so we can contribute our changes back to the original developers.

Submodules, command line

You will need to also install git onto your system to manage repository features we use that Visual Studio does not fully support (submodules). You can install git from here. Use the default options during the installation, but make sure that git is added to the PATH.

Open a command prompt and navigate to the project directory where you cloned Legendary Explorer, using the cd command to change directories. Once you are in the project directory, you need to issue the command git submodule update --init, which initializes and clones our submodules.

Git command line

Visual Studio

Back in Visual Studio, Open up the LegendaryExplorer folder and double click LegendaryExplorer.sln.

How to open

The project will load. It may take some time.

Set project to Debug x64

Ensure the configuration of the project matches the below picture in the configuration selector. image

The different values change how the project builds.

Toolset Configurations

  • Debug: Windows, Debug mode. This is how the toolset is developed and enables experiments and other basic debug features.
  • Release: Windows, Release mode. This is how the toolset is built for release. Experiments and other toolset debugging tools are disabled.
  • WinAzureRelease: Windows, Release mode, for Azure. This is how the toolset is built and tested on Microsoft Azure. It has a few extra methods to handle the limitations of Azure (such as not having a copy of the game). You will not want to use this.

Processor type

x64: LegendaryExplorer + LegendaryExplorerCore will not properly work on any platform besides x64, as it depends on x64 native libraries. If the selection is not x64, change it to x64.

Project to run

LegendaryExplorer: The LegendaryExplorer UI app. The other projects are supporting projects and can't actually be run by Visual Studio except for Hex Converter.

Build and run project

Select the Start button next to the project name at the top, and the project will build and run.

While running within Visual Studio, exceptions may cause the program to pause. You can press Continue when this occurs. In non-visual studio run instances, the application will not pause.

Getting latest code

To get the latest code once you've built the project (and we commit further code), you will need to do a pull. Go to Git Changes and click pull, and our latest code changes will download into your local repository. When you run the app again, it will rebuild against the latest codebase.

Ensure you are on the Beta branch, or whatever branch you want to build against, some features are built on different branches. You can find them under the Branches dropdown, and then under remotes.

Clone this wiki locally