第65行: |
第65行: |
| }} | | }} |
| | | |
− | ===Create the project=== | + | === 创建解决方案=== |
− | A SMAPI mod is a compiled library (DLL) with an entry method that gets called by SMAPI, so let's set that up.
| + | 一个 SMAPI 模组是具有 SMAPI 调用入口方法的动态链接库(DLL),因此要对其进行设置 |
| | | |
− | # Open Visual Studio or MonoDevelop. | + | # 打开 Visual Studio 或者 MonoDevelop. |
− | # Create a solution with a .NET Framework class library project (see [[Modding:IDE reference#create-project|how to create a project]]). '''Make sure you choose .NET Framework, not .NET Core or .NET Standard.''' | + | # 创建 类库 项目,选择 .NET Framework 框架 ( 参阅 [[ 模组:IDE 参考# 创建项目| 如何创建一个项目]]) 。确保你选择的是 .NET Framework 而不是 .NET Core 或者 .NET Standard |
− | # Change the target framework to .NET Framework 4.5, 4.5.1, or 4.5.2 for best compatibility (see [[Modding:IDE reference#set-target-framework|how to change target framework]]). | + | # 选择目标框架版本为 .NET Framework 4.5 或 4.5.1 ,使用 4.5.2 最佳 ( 参阅 [[ 模组:IDE 参考# 选择目标框架| 如何改变目标框架]]) |
− | # Reference the [https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig <tt>Pathoschild.Stardew.ModBuildConfig</tt> NuGet package] (see [[Modding:IDE reference#add-nuget|how to add the package]]). | + | # 参考 [https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig <tt>Pathoschild.Stardew.ModBuildConfig</tt> NuGet 包管理器] ( 参阅 [[ 模组:IDE 参考# 添加 NuGet 包| 如何添加 NuGet 包]]). |
− | # Restart Visual Studio/MonoDevelop after installing the package. | + | # 安装完包之后重新启动 Visual Studio 或者 MonoDevelop |
| | | |
| ===Add the code=== | | ===Add the code=== |