Keen:Visual Studio Setup Guide: Difference between revisions

From Medieval Engineers Wiki
Jump to navigation Jump to search
(Created page with "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 us...")
 
mNo edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{SEO|image_url=http://www.medievalengineerswiki.com/images/b/b7/KeenLogoBig.png|description=This page will walk you through how to install and set up Visual Studio 2017 to start programming in Medieval Engineers.}}
{{Keen:OCH}}
{{Version <!-- Do not change the version until the entire page is up-to-date -->
|release=0|major=6|minor=X|suppress=true}}
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.


Line 13: Line 21:
# 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.
# 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.
# 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 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


[[Category:Keen_Modding_Guides]]
[[Category:Keen_Modding_Guides]]

Latest revision as of 12:51, 7 July 2018



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.

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.

  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