Changes

Jump to navigation Jump to search
→‎Changes: + removed dependencies
Line 184: Line 184:  
string value = perScreen.Value; // returns empty string by default
 
string value = perScreen.Value; // returns empty string by default
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
|}
 +
 +
===Removed dependencies===
 +
SMAPI 4.0.0 no longer uses these dependencies, so they won't be loaded automatically anymore. If you manually referenced one of them, either copy it into your mod's release folder or see the suggested migration below.
 +
 +
{| class="wikitable"
 +
|-
 +
! dependency
 +
! suggested migration
 +
|-
 +
| <samp>System.Configuration.ConfigurationManager.dll</samp>
 +
| Use the [[Modding:Modder Guide/APIs/Config|standard config API]] instead.
 +
|-
 +
| <samp>System.Runtime.Caching.dll</samp>
 +
| Avoid <samp>MemoryCache</samp> or <samp>ObjectCache</samp> from this DLL, which can negatively impact performance for players. If you need cache expiry, consider the faster (but still heavy) [https://docs.microsoft.com/en-us/dotnet/core/extensions/caching <samp>Microsoft.Extensions.Caching.Memory</samp>] package instead. Otherwise consider using a plain <samp>Dictionary&lt;TKey, TValue&gt;</samp> field instead.
 +
|-
 +
| <samp>System.Security.Permissions.dll</samp>
 +
| This is usually only needed for <samp>System.Configuration.ConfigurationManager.dll</samp> or <samp>System.Runtime.Caching.dll</samp>, and can probably be removed.
 
|}
 
|}
    
[[Category:Modding]]
 
[[Category:Modding]]
translators
8,445

edits

Navigation menu