Skip to content

How to build the toolset from source

Natalie Howes edited this page Apr 24, 2022 · 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 5.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 5.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 5.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. 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 WinDebug x64

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

The different values change how the project builds.

Toolset Configurations

  • WinDebug: Windows, Debug mode. This is how the toolset is developed and enables experiments and other basic debug features.
  • WinRelease: 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.

Library Configurations

LegendaryExplorerCore supports building for Linux. You can build in Linux mode by setting the configuration to LinuxDebug or LinuxRelease. The main difference between Windows and Linux code is the automatic game lookup is disabled, as it depends on the Windows Registry. These options are not shown in the LegendaryExplorer.sln solution, and must be added by whatever solution is hosting the LegendaryExplorerCore project.

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