Keen:Visual Studio Setup Guide: Difference between revisions
CptTwinkie (talk | contribs) mNo edit summary |
CptTwinkie (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
{{Version <!-- Do not change the version until the entire page is up-to-date --> | {{Version <!-- Do not change the version until the entire page is up-to-date --> | ||
|release=0 | |release=0|major=5|minor=X|suppress=true}} | ||
|major=5 | |||
}} | |||
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. | 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. | ||
Revision as of 17:57, 27 December 2017
Version: | 0.5 |
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.
Installation
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