Difference between revisions of "Modding:IDE reference"

From Stardew Valley Wiki
Jump to navigation Jump to search
(copy from canimod.com with permission, dual-licensed CC BY-NC-SA for compatibility with wiki. Only author is Pathoschild.)
 
(wikify)
Line 1: Line 1:
<pre>
+
←[[Modding:Index|Index]]
---
 
layout: default
 
title: Creating a SMAPI mod » IDE primer
 
intro: >
 
  This page is a quick reference for how to use Visual Studio 2017 or MonoDevelop/Xamarin when
 
  creating or editing a SMAPI mod. See <em><a href="creating-a-smapi-mod">creating a SMAPI mod</a></em>
 
  for the main guide.
 
---
 
  
## Before you start
+
This page is a quick reference for how to use Visual Studio 2017 or MonoDevelop/Xamarin when creating or editing a SMAPI mod. See [[Modding:Creating a SMAPI mod]] for the main guide.
* You should install [Visual Studio 2017 Community](https://www.visualstudio.com/vs/community/) (on Windows) or [MonoDevelop](http://www.monodevelop.com/) (on Linux/Mac).
 
* Reviewing [_C# Fundamentals for Absolute Beginners_](https://mva.microsoft.com/en-us/training-courses/c-fundamentals-for-absolute-beginners-16169)
 
is strongly recommended if you're new to programming C#.
 
* Here are some basic terms to remember:
 
  
  term    | definition
+
==Before you start==
  -------- | ----------
+
<ul>
  IDE      | The program used to edit, run, and compile your code (short for _Integrated Development Environment_). The main IDEs are Visual Studio on Windows, and MonoDevelop/Xamarin on Linux/Mac.
+
<li>You should install [https://www.visualstudio.com/vs/community/ Visual Studio 2017 Community] (Windows) or [http://www.monodevelop.com/ MonoDevelop] (on Linux/Mac).</li>
  DLL      | The file with a `.dll` extension which contains your compiled code (short for _Dynamic Link Library_). This is the file that SMAPI reads when loading your mod.
+
<li>Reviewing [https://mva.microsoft.com/en-us/training-courses/c-fundamentals-for-absolute-beginners-16169 ''C# Fundamentals for Absolute Beginners''] is strongly recommended if you're new to programming C#.</li>
  project  | A collection of source code + configuration + resources (like images) you edit in the IDE. Each project is compiled into its own DLL.
+
<li>Here are some basic terms to remember:
  solution | A collection of projects with some global settings. The solution itself isn't compiled, but it enables some convenient features (like letting projects easily reference each other).
 
  
## Create a mod project
+
{| class="wikitable"
<section id="create-project"></section>
+
|-
 +
! term !! definition
 +
|-
 +
| IDE || The program used to edit, run, and compile your code (short for ''Integrated Development Environment''). The main IDEs are Visual Studio on Windows, and MonoDevelop/Xamarin on Linux/Mac.
 +
|-
 +
| DLL || The file with a <tt>.dll</tt> extension which contains your compiled code (short for ''Dynamic Link Library''). This is the file that SMAPI reads when loading your mod.
 +
|-
 +
| project || A collection of source code + configuration + resources (like images) you edit in the IDE. Each project is compiled into its own DLL.
 +
|-
 +
| solution || A collection of projects with some global settings. The solution itself isn't compiled, but it enables some convenient features (like letting projects easily reference each other).
 +
|}</li>
 +
</ul>
  
 +
==Create a mod project==
 +
<span id="create-project"></span>
 
Before you can write your mod code, you need to create a solution and project to contain it.
 
Before you can write your mod code, you need to create a solution and project to contain it.
  
### In Visual Studio 2017
+
===In Visual Studio 2017===
 +
# Open Visual Studio 2017.
 +
# Click ''File » New » Project'' from the menu bar:<br />[[File:Modding - IDE reference - create project (Visual Studio 1).png]]
 +
# In the 'New Project' window, choose ''Visual C# » Class Library (.NET Framework)'':<br />[[File:Modding - IDE reference - create project (Visual Studio 2).png]]
 +
# Enter a descriptive mod name. By convention, the name should be one word with mixed caps (like "PineapplesEverywhere"):<br />[[File:Modding - IDE reference - create project (Visual Studio 3).png]]
 +
# Make sure "create directory for solution" is checked, and click ''OK'':<br />[[File:Modding - IDE reference - create project (Visual Studio 4).png]]
  
1. Open Visual Studio 2017.
+
===In MonoDevelop/Xamarin===
2. Click _File » New » Project_ from the menu bar:
+
# Open MonoDevelop/Xamarin.
  ![](images/creating-a-smapi-mod-ide-primer/create-project-vs-1.png)
+
# Click ''File » New Solution'' from the menu bar:<br />[[File:Modding - IDE reference - create project (MonoDevelop 1).png]]
3. In the 'New Project' window, choose _Visual C# » Class Library (.NET Framework)_:
+
# In the 'New Project' window, choose ''.NET » Library'' and click ''Next'':<br />[[File:Modding - IDE reference - create project (MonoDevelop 2).png]]
  ![](images/creating-a-smapi-mod-ide-primer/create-project-vs-2.png)
+
# Enter a descriptive mod name. By convention, the name should be one word with mixed caps (like "PineapplesEverywhere"):<br />[[File:Modding - IDE reference - create project (MonoDevelop 3).png]]
4. Enter a descriptive mod name. By convention, the name should be one word with mixed caps (like
+
# Make sure "create a project directory within the solution directory" is checked, and click ''Create'':<br />[[File:Modding - IDE reference - create project (MonoDevelop 4).png]]
  "PineapplesEverywhere"):
 
  ![](images/creating-a-smapi-mod-ide-primer/create-project-vs-3.png)
 
5. Make sure "create directory for solution" is checked, and click _OK_:
 
  ![](images/creating-a-smapi-mod-ide-primer/create-project-vs-4.png)
 
  
### In MonoDevelop/Xamarin
+
==Set the target framework==
 +
<span id="set-target-framework"></span>
 +
The 'target framework' is the version of .NET Framework your code uses, which affects the version needed to run your mod. The recommended target framework is .NET Framework 4.5, which is the version SMAPI itself targets.
  
1. Open MonoDevelop/Xamarin.
+
===In Visual Studio 2017===
2. Click _File » New Solution_ from the menu bar:
+
# Open the Solution Explorer pane. If it's not visible, click ''View » Solution Explorer'' from the menu:<br />[[File:Modding - IDE reference - show solution pane (Visual Studio).png]]
  ![](images/creating-a-smapi-mod-ide-primer/create-project-monodev-1.png)
+
# From the Solution Explorer, right-click on the project and choose ''Properties'':<br />[[File:Modding - IDE reference - change target framework (Visual Studio 1).png]]
3. In the 'New Project' window, choose _.NET » Library_ and click _Next_:
+
# On the ''Application'' tab, change the ''Target Framework'' dropdown to ''.NET Framework 4.5'':<br />[[File:Modding - IDE reference - change target framework (Visual Studio 2).png]]
  ![](images/creating-a-smapi-mod-ide-primer/create-project-monodev-2.png)
+
# A dialogue may appear asking you to confirm the change. Click 'Yes' to confirm:<br />[[File:Modding - IDE reference - change target framework (Visual Studio 3).png]]
4. Enter a descriptive mod name. By convention, the name should be one word with mixed caps (like
 
  "PineapplesEverywhere"):
 
  ![](images/creating-a-smapi-mod-ide-primer/create-project-monodev-3.png)
 
5. Make sure "create a project directory within the solution directory" is checked, and click _Create_: 
 
  ![](images/creating-a-smapi-mod-ide-primer/create-project-monodev-4.png)
 
  
## Set the target framework
+
===In MonoDevelop/Xamarin===
<section id="set-target-framework"></section>
+
# Open the Solution pad. If it's not visible, click ''View » Pads » Solution'' from the menu:<br />[[File:Modding - IDE reference - show solution pane (MonoDevelop).png]]
 +
# From the Solution pad, right-click on the project and choose ''Options'':<br />[[File:Modding - IDE reference - change target framework (MonoDevelop 1).png]]
 +
# On the ''Build » General'' tab, change the ''Target Framework'' dropdown to ''Mono / .NET 4.5'':<br />[[File:Modding - IDE reference - change target framework (MonoDevelop 2).png]]
  
The 'target framework' is the version of .NET Framework your code uses, which affects the version
+
==Add a file==
needed to run your mod. The recommended target framework is .NET Framework 4.5, which is the
+
<span id="add-file"></span>
version SMAPI itself targets.
 
  
### In Visual Studio 2017
+
===In Visual Studio 2017===
 +
# Open the Solution Explorer pane. If it's not visible, click ''View » Solution Explorer'' from the menu:<br />[[File:Modding - IDE reference - show solution pane (Visual Studio).png]]
 +
# From the Solution Explorer pane, right-click on the project and choose ''Add » New Item'':<br />[[File:Modding - IDE reference - create file (Visual Studio 1).png]]
 +
# From the 'Add New Item' window, choose the file type (usually ''Visual C# Item » Class''):<br />[[File:Modding - IDE reference - create file (Visual Studio 2).png]]
 +
# Enter a descriptive file name and click ''Add'':<br />[[File:Modding - IDE reference - create file (Visual Studio 3).png]]
  
1. Open the Solution Explorer pane. If it's not visible, click _View » Solution Explorer_
+
===In MonoDevelop/Xamarin===
  from the menu:
+
# Open the Solution pad. If it's not visible, click ''View » Pads » Solution'' from the menu:<br />[[File:Modding - IDE reference - show solution pane (MonoDevelop).png]]
  ![](images/creating-a-smapi-mod-ide-primer/show-solution-pane-vs.png)
+
# From the Solution pad, right-click on the project to delete and choose ''Add » New File'':<br />[[File:Modding - IDE reference - create file (MonoDevelop 1).png]]
2. From the Solution Explorer, right-click on the project and choose _Properties_:
+
# From the 'New File' window, choose the file type (usually ''General » Empty Class''):<br />[[File:Modding - IDE reference - create file (MonoDevelop 2).png]]
  ![](images/creating-a-smapi-mod-ide-primer/change-target-framework-vs-1.png)
+
# Enter a descriptive file name and click ''New'':<br />[[File:Modding - IDE reference - create file (MonoDevelop 3).png]]
3. On the _Application_ tab, change the _Target Framework_ dropdown to _.NET Framework 4.5_:
 
  ![](images/creating-a-smapi-mod-ide-primer/change-target-framework-vs-2.png)
 
4. A dialogue may appear asking you to confirm the change. Click 'Yes' to confirm:
 
  ![](images/creating-a-smapi-mod-ide-primer/change-target-framework-vs-3.png)
 
  
### In MonoDevelop/Xamarin
+
==Delete a file==
 +
<span id="delete-file"></span>
  
1. Open the Solution pad. If it's not visible, click _View » Pads » Solution_ from the
+
===In Visual Studio 2017===
  menu:
+
# Open the Solution Explorer pane. If it's not visible, click ''View » Solution Explorer'' from the menu:<br />[[File:Modding - IDE reference - show solution pane (Visual Studio).png]]
  ![](images/creating-a-smapi-mod-ide-primer/show-solution-pane-monodev.png)
+
# From the Solution Explorer pane, right-click on the file to delete and choose ''Delete'':<br />[[File:Modding - IDE reference - delete file (Visual Studio).png]]
2. From the Solution pad, right-click on the project and choose _Options_:
 
  ![](images/creating-a-smapi-mod-ide-primer/change-target-framework-monodev-1.png)
 
3. On the _Build » General_ tab, change the _Target Framework_ dropdown to _Mono / .NET 4.5_: 
 
  ![](images/creating-a-smapi-mod-ide-primer/change-target-framework-monodev-2.png)
 
  
## Add a file
+
===In MonoDevelop/Xamarin===
<section id="add-file"></section>
+
# Open the Solution pad. If it's not visible, click ''View » Pads » Solution'' from the menu:<br />[[File:Modding - IDE reference - show solution pane (MonoDevelop).png]]
 +
# From the Solution pad, right-click on the file to delete and choose ''Remove'':<br />[[File:Modding - IDE reference - delete file (MonoDevelop).png]]
  
### In Visual Studio 2017
+
==Add a NuGet package==
 +
<span id="add-nuget"></span>
  
1. Open the Solution Explorer pane. If it's not visible, click _View » Solution Explorer_
+
===In Visual Studio 2017===
  from the menu:
+
# Click ''Tools » NuGet Package Manager » Manage NuGet Packages for Solution'' from the menu:<br />[[File:Modding - IDE reference - add NuGet package (Visual Studio 1).png]]
  ![](images/creating-a-smapi-mod-ide-primer/show-solution-pane-vs.png)
+
# On the ''Browse'' tab, search for the package and click on the result to display some options:<br />[[File:Modding - IDE reference - add NuGet package (Visual Studio 2).png]]
2. From the Solution Explorer pane, right-click on the project and choose _Add » New Item_:
+
# In the options, check the box next to your project and click ''Install'':<br />[[File:Modding - IDE reference - add NuGet package (Visual Studio 3).png]]
  ![](images/creating-a-smapi-mod-ide-primer/create-file-vs-1.png)
+
# If a 'Review Changes' dialogue appears, click ''OK'':<br />[[File:Modding - IDE reference - add NuGet package (Visual Studio 4).png]]
3. From the 'Add New Item' window, choose the file type (usually _Visual C# Item » Class_):
 
  ![](images/creating-a-smapi-mod-ide-primer/create-file-vs-2.png)
 
4. Enter a descriptive file name and click _Add_:
 
  ![](images/creating-a-smapi-mod-ide-primer/create-file-vs-3.png)
 
  
### In MonoDevelop/Xamarin
+
===In MonoDevelop/Xamarin===
 +
# Click ''Project » Add NuGet Packages'' from the menu:<br />[[File:Modding - IDE reference - add NuGet package (MonoDevelop 1).png]]
 +
# Search for the package, click on the result, and click ''Add Package'':<br />[[File:Modding - IDE reference - add NuGet package (MonoDevelop 2).png]]
  
1. Open the Solution pad. If it's not visible, click _View » Pads » Solution_ from the
+
==Edit project file (<tt>.csproj</tt>)==
  menu: 
+
<span id="edit-project"></span>
  ![](images/creating-a-smapi-mod-ide-primer/show-solution-pane-monodev.png)
 
2. From the Solution pad, right-click on the project to delete and choose _Add » New File_: 
 
  ![](images/creating-a-smapi-mod-ide-primer/create-file-monodev-1.png)
 
3. From the 'New File' window, choose the file type (usually _General » Empty Class_): 
 
  ![](images/creating-a-smapi-mod-ide-primer/create-file-monodev-2.png)
 
4. Enter a descriptive file name and click _New_: 
 
  ![](images/creating-a-smapi-mod-ide-primer/create-file-monodev-3.png)
 
  
## Delete a file
+
Sometimes you may want to edit the project file directly (mainly to configure build steps). The project is a <tt>.csproj</tt> file, and can be edited from within the IDE.
<section id="delete-file"></section>
 
  
### In Visual Studio 2017
+
===In Visual Studio 2017===
 +
# Open the Solution Explorer pane. If it's not visible, click ''View » Solution Explorer'' from the menu:<br />[[File:Modding - IDE reference - show solution pane (Visual Studio).png]]
 +
# From the Solution Explorer pane, right-click on the project and choose ''Unload'':<br />[[File:Modding - IDE reference - edit project (Visual Studio 1).png]]
 +
# Right-click on the project again and choose ''Edit &lt;project name&gt;.csproj'':<br />[[File:Modding - IDE reference - edit project (Visual Studio 2).png]]
 +
# Make your changes in the editor that appears and save.
 +
# When you're done, right-click on the project again and choose ''Reload Project'':<br />[[File:Modding - IDE reference - edit project (Visual Studio 3).png]]
  
1. Open the Solution Explorer pane. If it's not visible, click _View » Solution Explorer_
+
===In MonoDevelop/Xamarin===
  from the menu:
+
# Open the Solution pad. If it's not visible, click ''View » Pads » Solution'' from the menu:<br />[[File:Modding - IDE reference - show solution pane (MonoDevelop).png]]
  ![](images/creating-a-smapi-mod-ide-primer/show-solution-pane-vs.png)
+
# From the Solution pad, right-click on the project and choose ''Tools » Edit File'':<br />[[File:Modding - IDE reference - edit project (MonoDevelop).png]]
2. From the Solution Explorer pane, right-click on the file to delete and choose _Delete_:
+
# Make your changes in the editor that appears and save.
  ![](images/creating-a-smapi-mod-ide-primer/delete-file-vs.png)
 
  
### In MonoDevelop/Xamarin
+
==Find compiled files==
 +
<span id="build-output"></span>
  
1. Open the Solution pad. If it's not visible, click _View » Pads » Solution_ from the
+
===In Visual Studio 2017===
  menu:
+
# Open the Solution Explorer pane. If it's not visible, click ''View » Solution Explorer'' from the menu:<br />[[File:Modding - IDE reference - show solution pane (Visual Studio).png]]
  ![](images/creating-a-smapi-mod-ide-primer/show-solution-pane-monodev.png)
+
# From the Solution Explorer pane, right-click on the project and choose ''Open Folder in File Explorer'':<br />[[File:Modding - IDE reference - view build output (Visual Studio).png]]
2. From the Solution pad, right-click on the file to delete and choose _Remove_:
+
# Navigate to <tt>bin\Debug</tt> (or <tt>bin\Release</tt> if you switched to release build configuration).
  ![](images/creating-a-smapi-mod-ide-primer/delete-file-monodev.png)
 
  
## Add a NuGet package
+
===In MonoDevelop/Xamarin===
<section id="add-nuget"></section>
+
# Open the Solution pad. If it's not visible, click ''View » Pads » Solution'' from the menu:<br />[[File:Modding - IDE reference - show solution pane (MonoDevelop).png]]
 
+
# From the Solution pad, right-click on the project and choose ''Open Containing Folder'':<br />[[File:Modding - IDE reference - view build output (MonoDevelop).png]]
### In Visual Studio 2017
+
# Navigate to <tt>bin/Debug</tt> (or <tt>bin/Release</tt> if you switched to release build configuration).
 
 
1. Click _Tools » NuGet Package Manager » Manage NuGet Packages for Solution_ from the menu: 
 
  ![](images/creating-a-smapi-mod-ide-primer/add-nuget-package-vs-1.png)
 
2. On the _Browse_ tab, search for the package and click on the result to display some options: 
 
  ![](images/creating-a-smapi-mod-ide-primer/add-nuget-package-vs-2.png)
 
3. In the options, check the box next to your project and click _Install_: 
 
  ![](images/creating-a-smapi-mod-ide-primer/add-nuget-package-vs-3.png)
 
4. If a 'Review Changes' dialogue appears, click _OK_: 
 
  ![](images/creating-a-smapi-mod-ide-primer/add-nuget-package-vs-4.png)
 
 
 
### In MonoDevelop/Xamarin
 
 
 
1. Click _Project » Add NuGet Packages_ from the menu: 
 
  ![](images/creating-a-smapi-mod-ide-primer/add-nuget-package-monodev-1.png)
 
2. Search for the package, click on the result, and click _Add Package_: 
 
  ![](images/creating-a-smapi-mod-ide-primer/add-nuget-package-monodev-2.png)
 
 
 
## Edit project file (`.csproj`)
 
<section id="edit-project"></section>
 
 
 
Sometimes you may want to edit the project file directly (mainly to configure build steps). The
 
project is a `.csproj` file, and can be edited from within the IDE.
 
 
 
### In Visual Studio 2017
 
 
 
1. Open the Solution Explorer pane. If it's not visible, click _View » Solution Explorer_
 
  from the menu:
 
  ![](images/creating-a-smapi-mod-ide-primer/show-solution-pane-vs.png)
 
2. From the Solution Explorer pane, right-click on the project and choose _Unload_: 
 
  ![](images/creating-a-smapi-mod-ide-primer/edit-project-file-vs-1.png)
 
3. Right-click on the project again and choose _Edit &lt;project name&gt;.csproj_: 
 
  ![](images/creating-a-smapi-mod-ide-primer/edit-project-file-vs-2.png)
 
4. Make your changes in the editor that appears and save.
 
5. When you're done, right-click on the project again and choose _Reload Project_: 
 
  ![](images/creating-a-smapi-mod-ide-primer/edit-project-file-vs-3.png)
 
 
 
### In MonoDevelop/Xamarin
 
 
 
1. Open the Solution pad. If it's not visible, click _View » Pads » Solution_ from the
 
  menu: 
 
  ![](images/creating-a-smapi-mod-ide-primer/show-solution-pane-monodev.png)
 
2. From the Solution pad, right-click on the project and choose _Tools » Edit File_:
 
  ![](images/creating-a-smapi-mod-ide-primer/edit-project-file-monodev.png)
 
3. Make your changes in the editor that appears and save.
 
 
 
## Find compiled files
 
<section id="build-output"></section>
 
 
 
### In Visual Studio 2017
 
 
 
1. Open the Solution Explorer pane. If it's not visible, click _View » Solution Explorer_
 
  from the menu: 
 
  ![](images/creating-a-smapi-mod-ide-primer/show-solution-pane-vs.png)
 
2. From the Solution Explorer pane, right-click on the project and choose _Open Folder in File Explorer_:
 
  ![](images/creating-a-smapi-mod-ide-primer/view-build-output-vs.png)
 
3. Navigate to the `bin\Debug` (or `bin\Release` if you switched to release build configuration).
 
 
 
### In MonoDevelop/Xamarin
 
 
 
1. Open the Solution pad. If it's not visible, click _View » Pads » Solution_ from the
 
  menu: 
 
  ![](images/creating-a-smapi-mod-ide-primer/show-solution-pane-monodev.png)
 
2. From the Solution pad, right-click on the project and choose _Open Containing Folder_: 
 
  ![](images/creating-a-smapi-mod-ide-primer/view-build-output-monodev.png)
 
3. Navigate to the `bin/Debug` (or `bin/Release` if you switched to release build configuration).
 
</pre>
 
  
 
[[Category:Modding|IDE reference]]
 
[[Category:Modding|IDE reference]]

Revision as of 00:04, 4 May 2017

Index

This page is a quick reference for how to use Visual Studio 2017 or MonoDevelop/Xamarin when creating or editing a SMAPI mod. See Modding:Creating a SMAPI mod for the main guide.

Before you start

  • You should install Visual Studio 2017 Community (Windows) or MonoDevelop (on Linux/Mac).
  • Reviewing C# Fundamentals for Absolute Beginners is strongly recommended if you're new to programming C#.
  • Here are some basic terms to remember:
    term definition
    IDE The program used to edit, run, and compile your code (short for Integrated Development Environment). The main IDEs are Visual Studio on Windows, and MonoDevelop/Xamarin on Linux/Mac.
    DLL The file with a .dll extension which contains your compiled code (short for Dynamic Link Library). This is the file that SMAPI reads when loading your mod.
    project A collection of source code + configuration + resources (like images) you edit in the IDE. Each project is compiled into its own DLL.
    solution A collection of projects with some global settings. The solution itself isn't compiled, but it enables some convenient features (like letting projects easily reference each other).

Create a mod project

Before you can write your mod code, you need to create a solution and project to contain it.

In Visual Studio 2017

  1. Open Visual Studio 2017.
  2. Click File » New » Project from the menu bar:
    Modding - IDE reference - create project (Visual Studio 1).png
  3. In the 'New Project' window, choose Visual C# » Class Library (.NET Framework):
    Modding - IDE reference - create project (Visual Studio 2).png
  4. Enter a descriptive mod name. By convention, the name should be one word with mixed caps (like "PineapplesEverywhere"):
    Modding - IDE reference - create project (Visual Studio 3).png
  5. Make sure "create directory for solution" is checked, and click OK:
    File:Modding - IDE reference - create project (Visual Studio 4).png

In MonoDevelop/Xamarin

  1. Open MonoDevelop/Xamarin.
  2. Click File » New Solution from the menu bar:
    Modding - IDE reference - create project (MonoDevelop 1).png
  3. In the 'New Project' window, choose .NET » Library and click Next:
    Modding - IDE reference - create project (MonoDevelop 2).png
  4. Enter a descriptive mod name. By convention, the name should be one word with mixed caps (like "PineapplesEverywhere"):
    Modding - IDE reference - create project (MonoDevelop 3).png
  5. Make sure "create a project directory within the solution directory" is checked, and click Create:
    Modding - IDE reference - create project (MonoDevelop 4).png

Set the target framework

The 'target framework' is the version of .NET Framework your code uses, which affects the version needed to run your mod. The recommended target framework is .NET Framework 4.5, which is the version SMAPI itself targets.

In Visual Studio 2017

  1. Open the Solution Explorer pane. If it's not visible, click View » Solution Explorer from the menu:
    Modding - IDE reference - show solution pane (Visual Studio).png
  2. From the Solution Explorer, right-click on the project and choose Properties:
    Modding - IDE reference - change target framework (Visual Studio 1).png
  3. On the Application tab, change the Target Framework dropdown to .NET Framework 4.5:
    Modding - IDE reference - change target framework (Visual Studio 2).png
  4. A dialogue may appear asking you to confirm the change. Click 'Yes' to confirm:
    Modding - IDE reference - change target framework (Visual Studio 3).png

In MonoDevelop/Xamarin

  1. Open the Solution pad. If it's not visible, click View » Pads » Solution from the menu:
    Modding - IDE reference - show solution pane (MonoDevelop).png
  2. From the Solution pad, right-click on the project and choose Options:
    Modding - IDE reference - change target framework (MonoDevelop 1).png
  3. On the Build » General tab, change the Target Framework dropdown to Mono / .NET 4.5:
    Modding - IDE reference - change target framework (MonoDevelop 2).png

Add a file

In Visual Studio 2017

  1. Open the Solution Explorer pane. If it's not visible, click View » Solution Explorer from the menu:
    Modding - IDE reference - show solution pane (Visual Studio).png
  2. From the Solution Explorer pane, right-click on the project and choose Add » New Item:
    Modding - IDE reference - create file (Visual Studio 1).png
  3. From the 'Add New Item' window, choose the file type (usually Visual C# Item » Class):
    Modding - IDE reference - create file (Visual Studio 2).png
  4. Enter a descriptive file name and click Add:
    Modding - IDE reference - create file (Visual Studio 3).png

In MonoDevelop/Xamarin

  1. Open the Solution pad. If it's not visible, click View » Pads » Solution from the menu:
    Modding - IDE reference - show solution pane (MonoDevelop).png
  2. From the Solution pad, right-click on the project to delete and choose Add » New File:
    Modding - IDE reference - create file (MonoDevelop 1).png
  3. From the 'New File' window, choose the file type (usually General » Empty Class):
    Modding - IDE reference - create file (MonoDevelop 2).png
  4. Enter a descriptive file name and click New:
    Modding - IDE reference - create file (MonoDevelop 3).png

Delete a file

In Visual Studio 2017

  1. Open the Solution Explorer pane. If it's not visible, click View » Solution Explorer from the menu:
    Modding - IDE reference - show solution pane (Visual Studio).png
  2. From the Solution Explorer pane, right-click on the file to delete and choose Delete:
    Modding - IDE reference - delete file (Visual Studio).png

In MonoDevelop/Xamarin

  1. Open the Solution pad. If it's not visible, click View » Pads » Solution from the menu:
    Modding - IDE reference - show solution pane (MonoDevelop).png
  2. From the Solution pad, right-click on the file to delete and choose Remove:
    Modding - IDE reference - delete file (MonoDevelop).png

Add a NuGet package

In Visual Studio 2017

  1. Click Tools » NuGet Package Manager » Manage NuGet Packages for Solution from the menu:
    Modding - IDE reference - add NuGet package (Visual Studio 1).png
  2. On the Browse tab, search for the package and click on the result to display some options:
    Modding - IDE reference - add NuGet package (Visual Studio 2).png
  3. In the options, check the box next to your project and click Install:
    Modding - IDE reference - add NuGet package (Visual Studio 3).png
  4. If a 'Review Changes' dialogue appears, click OK:
    Modding - IDE reference - add NuGet package (Visual Studio 4).png

In MonoDevelop/Xamarin

  1. Click Project » Add NuGet Packages from the menu:
    Modding - IDE reference - add NuGet package (MonoDevelop 1).png
  2. Search for the package, click on the result, and click Add Package:
    Modding - IDE reference - add NuGet package (MonoDevelop 2).png

Edit project file (.csproj)

Sometimes you may want to edit the project file directly (mainly to configure build steps). The project is a .csproj file, and can be edited from within the IDE.

In Visual Studio 2017

  1. Open the Solution Explorer pane. If it's not visible, click View » Solution Explorer from the menu:
    Modding - IDE reference - show solution pane (Visual Studio).png
  2. From the Solution Explorer pane, right-click on the project and choose Unload:
    Modding - IDE reference - edit project (Visual Studio 1).png
  3. Right-click on the project again and choose Edit <project name>.csproj:
    Modding - IDE reference - edit project (Visual Studio 2).png
  4. Make your changes in the editor that appears and save.
  5. When you're done, right-click on the project again and choose Reload Project:
    Modding - IDE reference - edit project (Visual Studio 3).png

In MonoDevelop/Xamarin

  1. Open the Solution pad. If it's not visible, click View » Pads » Solution from the menu:
    Modding - IDE reference - show solution pane (MonoDevelop).png
  2. From the Solution pad, right-click on the project and choose Tools » Edit File:
    Modding - IDE reference - edit project (MonoDevelop).png
  3. Make your changes in the editor that appears and save.

Find compiled files

In Visual Studio 2017

  1. Open the Solution Explorer pane. If it's not visible, click View » Solution Explorer from the menu:
    Modding - IDE reference - show solution pane (Visual Studio).png
  2. From the Solution Explorer pane, right-click on the project and choose Open Folder in File Explorer:
    Modding - IDE reference - view build output (Visual Studio).png
  3. Navigate to bin\Debug (or bin\Release if you switched to release build configuration).

In MonoDevelop/Xamarin

  1. Open the Solution pad. If it's not visible, click View » Pads » Solution from the menu:
    Modding - IDE reference - show solution pane (MonoDevelop).png
  2. From the Solution pad, right-click on the project and choose Open Containing Folder:
    Modding - IDE reference - view build output (MonoDevelop).png
  3. Navigate to bin/Debug (or bin/Release if you switched to release build configuration).