Line 1: |
Line 1: |
| ←[[Modding:Index|Index]] | | ←[[Modding:Index|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:Modder Guide]] for the main guide. | + | This page is a quick reference for how to use Visual Studio 2017 or MonoDevelop/Visual Studio for Mac when creating or editing a SMAPI mod. See [[Modding:Modder Guide]] for the main guide. |
| | | |
| ==Before you start== | | ==Before you start== |
Line 13: |
Line 13: |
| ! term !! definition | | ! 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. | + | | 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/Visual Studio for Mac 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. | | | 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. |
Line 34: |
Line 34: |
| # Make sure "create directory for solution" is checked, and click ''OK'':<br />[[File:Modding - IDE reference - create project (Visual Studio 4).png]] | | # Make sure "create directory for solution" is checked, and click ''OK'':<br />[[File:Modding - IDE reference - create project (Visual Studio 4).png]] |
| | | |
− | ===In MonoDevelop/Xamarin=== | + | ===In MonoDevelop/Visual Studio for Mac=== |
− | # Open MonoDevelop/Xamarin. | + | # Open MonoDevelop/Visual Studio for Mac. |
| # Click ''File » New Solution'' from the menu bar:<br />[[File:Modding - IDE reference - create project (MonoDevelop 1).png]] | | # Click ''File » New Solution'' from the menu bar:<br />[[File:Modding - IDE reference - create project (MonoDevelop 1).png]] |
| # In the 'New Project' window, choose ''.NET » Library'' and click ''Next'':<br />[[File:Modding - IDE reference - create project (MonoDevelop 2).png]] | | # In the 'New Project' window, choose ''.NET » Library'' and click ''Next'':<br />[[File:Modding - IDE reference - create project (MonoDevelop 2).png]] |
Line 51: |
Line 51: |
| # 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]] | | # 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]] |
| | | |
− | ===In MonoDevelop/Xamarin=== | + | ===In MonoDevelop/Visual Studio for Mac=== |
| # 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]] | | # 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]] | | # From the Solution pad, right-click on the project and choose ''Options'':<br />[[File:Modding - IDE reference - change target framework (MonoDevelop 1).png]] |
Line 65: |
Line 65: |
| # Enter a descriptive file name and click ''Add'':<br />[[File:Modding - IDE reference - create file (Visual Studio 3).png]] | | # Enter a descriptive file name and click ''Add'':<br />[[File:Modding - IDE reference - create file (Visual Studio 3).png]] |
| | | |
− | ===In MonoDevelop/Xamarin=== | + | ===In MonoDevelop/Visual Studio for Mac=== |
| # 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]] | | # 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 to delete and choose ''Add » New File'':<br />[[File:Modding - IDE reference - create file (MonoDevelop 1).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]] |
Line 78: |
Line 78: |
| # 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]] | | # 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]] |
| | | |
− | ===In MonoDevelop/Xamarin=== | + | ===In MonoDevelop/Visual Studio for Mac=== |
| # 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]] | | # 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]] | | # From the Solution pad, right-click on the file to delete and choose ''Remove'':<br />[[File:Modding - IDE reference - delete file (MonoDevelop).png]] |
Line 91: |
Line 91: |
| # If a 'Review Changes' dialogue appears, click ''OK'':<br />[[File:Modding - IDE reference - add NuGet package (Visual Studio 4).png]] | | # If a 'Review Changes' dialogue appears, click ''OK'':<br />[[File:Modding - IDE reference - add NuGet package (Visual Studio 4).png]] |
| | | |
− | ===In MonoDevelop/Xamarin=== | + | ===In MonoDevelop/Visual Studio for Mac=== |
| # Click ''Project » Add NuGet Packages'' from the menu:<br />[[File:Modding - IDE reference - add NuGet package (MonoDevelop 1).png]] | | # 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]] | | # Search for the package, click on the result, and click ''Add Package'':<br />[[File:Modding - IDE reference - add NuGet package (MonoDevelop 2).png]] |
Line 107: |
Line 107: |
| # 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]] | | # 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]] |
| | | |
− | ===In MonoDevelop/Xamarin=== | + | ===In MonoDevelop/Visual Studio for Mac=== |
| # 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]] | | # 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 ''Tools » Edit File'':<br />[[File:Modding - IDE reference - edit project (MonoDevelop).png]] | | # From the Solution pad, right-click on the project and choose ''Tools » Edit File'':<br />[[File:Modding - IDE reference - edit project (MonoDevelop).png]] |
Line 120: |
Line 120: |
| # Navigate to <tt>bin\Debug</tt> (or <tt>bin\Release</tt> if you switched to release build configuration). | | # Navigate to <tt>bin\Debug</tt> (or <tt>bin\Release</tt> if you switched to release build configuration). |
| | | |
− | ===In MonoDevelop/Xamarin=== | + | ===In MonoDevelop/Visual Studio for Mac=== |
| # 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]] | | # 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]] | | # From the Solution pad, right-click on the project and choose ''Open Containing Folder'':<br />[[File:Modding - IDE reference - view build output (MonoDevelop).png]] |