Add optional MinimumApiVersion to manifest.json
Pathoschild opened this issue ยท 4 comments
Consider letting mods have an optional MinimumApiVersion
field in their manifest.json
.
SMAPI releases can introduce new features, but some players will still have an old version of SMAPI. If they try to use mods written for a newer version, they'll get cryptic errors like ReflectionTypeLoadException
. SMAPI would validate this field before trying to load the DLL, so players would get a friendly "XXX mod requires a newer version of SMAPI, please update" error instead.
Is it possible (in addition) to catch such exceptions and convert them into a more friendly error?
Discussed on both Discord servers, and the idea was well-received. I'll add this to the 1.1 release.
@StefanOssendorf We can catch such exceptions, but we won't know why they happened. (Maybe they're written for a newer version of SMAPI, or an older version of SMAPI, or they require another mod, etc.) So the friendly error would basically just be "something went wrong loading the mod".