Changes

Jump to navigation Jump to search
+ .NET 6
Line 21: Line 21:  
# If SMAPI still says your mod is incompatible, check the <samp>TRACE</samp> messages in the log file for the reason why.<br />If the logs say "''marked 'assume broken' in SMAPI's internal compatibility list''", you can increase the <samp>Version</samp> in your content pack's <samp>manifest.json</samp> file to bypass it.
 
# If SMAPI still says your mod is incompatible, check the <samp>TRACE</samp> messages in the log file for the reason why.<br />If the logs say "''marked 'assume broken' in SMAPI's internal compatibility list''", you can increase the <samp>Version</samp> in your content pack's <samp>manifest.json</samp> file to bypass it.
 
# Test the mod in-game and make any other changes needed.
 
# Test the mod in-game and make any other changes needed.
 +
 +
==What's new architecturally?==
 +
===.NET 6===
 +
This release updates from .NET 5 to .NET 6. Mods can target either framework version without issue.
 +
 +
See [https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-6 ''What's new in .NET 6''] and [https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10 ''What's new in C# 10''] for more info, but some highlights include...
 +
* improved performance;
 +
* [https://devblogs.microsoft.com/dotnet/update-on-net-hot-reload-progress-and-visual-studio-2022-highlights/ improved hot reload];
 +
* [https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-6#new-linq-apis new LINQ methods];
 +
* and [https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/record record structs].
    
==What's new for items==
 
==What's new for items==
Line 5,543: Line 5,553:     
See also [[#Breaking changes for content packs|''Breaking changes for content packs'']], which affect C# mods too.
 
See also [[#Breaking changes for content packs|''Breaking changes for content packs'']], which affect C# mods too.
 +
 +
===.NET 6===
 +
: ''See also: [[#.NET 6|.NET 6 in what's new]].''
 +
 +
You can continue building mods in .NET 5 (SMAPI will load them fine), or migrate to .NET 6 to make use of newer features. If you want to update a mod:
 +
<ol>
 +
<li>Fully exit Visual Studio.</li>
 +
<li>Open each mod's <samp>.csproj</samp> file in a text editor, then find this line:
 +
<syntaxhighlight lang="xml">
 +
<TargetFramework>net5.0</TargetFramework>
 +
</syntaxhighlight>
 +
 +
And change it to this:
 +
<syntaxhighlight lang="xml">
 +
<TargetFramework>net6.0</TargetFramework>
 +
</syntaxhighlight>
 +
</li>
 +
<li>Delete your solution's hidden <samp>.vs</samp> folder, and every project's <samp>bin</samp> and <samp>obj</samp> folders.</li>
 +
<li>Reopen the solution in Visual Studio, click ''Build > Rebuild Solution'', and make sure it still loads into the game fine.</li>
 +
</ol>
    
===Item ID changes===
 
===Item ID changes===
translators
8,456

edits

Navigation menu