Keen:Visual Studio Setup Guide
|OFFICIAL CONTENT NOTICE|
OFFICIAL CONTENTThis article contains official content from or verified by the developers at Keen Software House. This information is intended to be accurate at the time it is posted. Due to Medieval Engineers being under active development, information may become obsolete very quickly. If you find errors in this article please describe the errors in the Discussion Page.
Medieval Engineers is in alpha stage of development. Everything in the game is subject to change.
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 http://www.visualstudio.com. 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.
- Open Visual Studio and at the top left of the window click File > New > Project or press Ctrl + Shift + N.
- 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.
- In the solution explorer of VS, right-click the Project (ClassLibrary1 by default) > Add > Reference... and click Browse in the dialog that appears.
- 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.
- Click MedievalEngineersModAPI.dll and click Add. Make Sure its box is checked and click OK.
- 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.
- 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