Changes

Jump to navigation Jump to search
push edit from User:FlameHorizon blocked by new user external links filter
Line 56: Line 56:  
#* On Mac: install [https://visualstudio.microsoft.com/vs/mac/ Visual Studio for Mac]. (This is a rebranded MonoDevelop.)
 
#* On Mac: install [https://visualstudio.microsoft.com/vs/mac/ Visual Studio for Mac]. (This is a rebranded MonoDevelop.)
 
#* On Windows: install [https://visualstudio.microsoft.com/vs/community/ Visual Studio Community]. When the installer asks about workloads, enable ''.NET Desktop Development''.  
 
#* On Windows: install [https://visualstudio.microsoft.com/vs/community/ Visual Studio Community]. When the installer asks about workloads, enable ''.NET Desktop Development''.  
# Install the [https://dotnet.microsoft.com/en-us/download/dotnet/5.0 NET 5.0 SDK (x64 version)].
+
# Install the [https://dotnet.microsoft.com/en-us/download/dotnet/6.0 NET 6.0 SDK (x64 version)].
    
If you're not familiar with Visual Studio (on Windows/Mac) or MonoDevelop (on Linux), [[Modding:IDE reference]] explains how to do the important stuff you need for this guide.
 
If you're not familiar with Visual Studio (on Windows/Mac) or MonoDevelop (on Linux), [[Modding:IDE reference]] explains how to do the important stuff you need for this guide.
Line 65: Line 65:  
{{collapse|expand for quick start|content= 
 
{{collapse|expand for quick start|content= 
 
# Create an empty ''Class Library'' project. (Don't select ''Class Library (.NET Framework)''!)
 
# Create an empty ''Class Library'' project. (Don't select ''Class Library (.NET Framework)''!)
# Target .NET 5.
+
# Target .NET 6.
 
# Reference the [https://smapi.io/package/readme <samp>Pathoschild.Stardew.ModBuildConfig</samp> NuGet package] to automatically add the right references depending on the platform the mod is being compiled on.
 
# Reference the [https://smapi.io/package/readme <samp>Pathoschild.Stardew.ModBuildConfig</samp> NuGet package] to automatically add the right references depending on the platform the mod is being compiled on.
 
# Create a <samp>ModEntry</samp> class which subclasses <samp>StardewModdingAPI.Mod</samp>.
 
# Create a <samp>ModEntry</samp> class which subclasses <samp>StardewModdingAPI.Mod</samp>.
Line 78: Line 78:  
# Open Visual Studio or MonoDevelop.
 
# Open Visual Studio or MonoDevelop.
 
# Create a solution with a ''Class Library'' project (see [[Modding:IDE reference#create-project|how to create a project]]). (Don't select ''Class Library (.NET Framework)''! That's a separate thing with a similar name.)
 
# Create a solution with a ''Class Library'' project (see [[Modding:IDE reference#create-project|how to create a project]]). (Don't select ''Class Library (.NET Framework)''! That's a separate thing with a similar name.)
# Target .NET 5 (see [[Modding:IDE reference#set-target-framework|how to change target framework]]).You may need to [https://dotnet.microsoft.com/en-us/download/dotnet/5.0 install the SDK]. <br /> <small>That's the version installed and used by the game. Newer versions may not be installed for players, and SMAPI may not be able to load them. [[#What does "target NET 5.0" mean?|Yes we know it's EOL]].</small>
+
# Target .NET 6 (see [[Modding:IDE reference#set-target-framework|how to change target framework]]).You may need to [https://dotnet.microsoft.com/en-us/download/dotnet/6.0 install the SDK]. <br /> <small>That's the version installed and used by the game. Newer versions may not be installed for players, and SMAPI may not be able to load them. [[#What does "target NET 6.0" mean?|Yes we know it's EOL]].</small>
 
# Reference the [https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig <samp>Pathoschild.Stardew.ModBuildConfig</samp> NuGet package] (see [[Modding:IDE reference#add-nuget|how to add the package]]).
 
# Reference the [https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig <samp>Pathoschild.Stardew.ModBuildConfig</samp> NuGet package] (see [[Modding:IDE reference#add-nuget|how to add the package]]).
 
#* If you are getting an error stating ''The type or namespace name "StardewModdingAPI" could not be found'', then it's possible that your game path is not being detected. You will need to set the GamePath property to the game's executable directory. This can be done by adding a ''GamePath'' property to the ''PropertyGroup'' in your ''.csproj'' settings.
 
#* If you are getting an error stating ''The type or namespace name "StardewModdingAPI" could not be found'', then it's possible that your game path is not being detected. You will need to set the GamePath property to the game's executable directory. This can be done by adding a ''GamePath'' property to the ''PropertyGroup'' in your ''.csproj'' settings.
Line 266: Line 266:  
To unpack the XNB data/image/map files, see [[Modding:Editing XNB files]].
 
To unpack the XNB data/image/map files, see [[Modding:Editing XNB files]].
   −
===What does "target NET 5.0" mean?===
+
===What does "target NET 6.0" mean?===
    
There are multiple different things here.  
 
There are multiple different things here.  
   −
* target version: this is the version of .NET your binary is compiled against. You have to target net 5.0 for stardew (and in general, you can at maximum use the version of .NET the person loading you uses.)
+
* target version: this is the version of .NET your binary is compiled against. You have to target net 6.0 for stardew (and in general, you can at maximum use the version of .NET the person loading you uses.)
* sdk version: this is the version of the .NET you installed. You can target any version less than your sdk version. If I have net 7.0 installed with VS 2022, I can still target net 5.0.
+
* sdk version: this is the version of the .NET you installed. You can target any version less than your sdk version. If I have net 7.0 installed with VS 2022, I can still target net 6.0.
 
* C# version - guess what? the language is versioned separately from the .NET version (although there is a correspondence) and you can pick your language version with <code><langversion></code> in the .csproj.
 
* C# version - guess what? the language is versioned separately from the .NET version (although there is a correspondence) and you can pick your language version with <code><langversion></code> in the .csproj.
  
105,662

edits

Navigation menu