Keen:Visual Studio Setup Guide

From Medieval Engineers Wiki
Jump to navigation Jump to search

Version: 0.6

This page will walk you through how to install and set up Visual Studio 2017 to start programming in Medieval Engineers whether it's an in-game script or a mod. In order to use the ME assemblies, we recommend Visual Studio 2017. There is a confirmed compiler crash in 2013 and we haven't tested 2015.


You can get Visual Studio 2017 from The Community edition is free and is all you need to program in Medieval Engineers.

When installing you should only need the .NET desktop development package.

Starting a Project

Starting a Medieval Engineers scripting project in Visual Studio is pretty simple.

  1. Open Visual Studio and at the top left of the window click File > New > Project or press Ctrl + Shift + N.
  2. In the dialog that appears, find the C# templates and select the "Class Library (.NET Standard)" template. Name the project if you want to and click OK.
  3. In the solution explorer of VS, right-click the Project (ClassLibrary1 by default) > Add > Reference... and click Browse in the dialog that appears.
  4. Navigate to the Medieval Engineers - Mod SDK installation directory, which is usually [Steam installation directory]\steamapps\common\MedievalEngineersModSDK\OriginalContent\ModTools. If you don't have the Medieval Engineers - Mod SDK you can download it from Steam by going to Library > Tools.
  5. Click MedievalEngineersModAPI.dll and click Add. Make Sure its box is checked and click OK.
  6. In the solution explorer of VS, delete all references other than MedievalEngineersModAPI. We include a special subset of the default libraries, giving you all the whitelisted interfaces from there as well.
  7. If you are creating a mod, this is all the setup you need to do to start using the Mod API.

If you have any existing projects you will want to remove all other assemblies and usings. We've whitelisted many partial system classes in the game so it is best to use what is available in the MedievalEngineersModAPI.dll