Setting up Visual Studio
- Download Visual Studio 2019 Community here
- Run the installer
.NET desktop development.
3a. Optionally you can untick unwanted features on the right side. The ones suggested in the picture below should be sufficient.
After the installer has finished, you are now ready to work with S&box using Visual Studio!
If you're new to C#, check out the C# Learning Resources to find resources that work for you.
For information on how to create your first gamemode, follow the tutorial on making a gamemode.
A solution file is automatically generated when you launch the game, you can find this solution next to your game directory.
This is a solution file you can open in Visual Studio, this solution contains all your addons as projects.
Each time you create a new addon you will need to restart your game to re-generate the solution.
- If you get a lot of errors from dependencies not being able to load, make sure you have the latest version of Visual Studio installed.
Visual Studio is an IDE with a lot of pre-installed tools, however if you find that you need something that it doesn't include, you can browse the extension manager.
- Click on
Extensionson the toolbar and select
- The Extension Manager should now appear and you can search for extensions. If you want more information about a certain extension, click on the blue
More Informationtext, and your browser will open a tab to the extension's page.
- s&box Tools (Adds some of the features in the external console to the IDE)
For info on debugging check out the Debugging page.