- Home /
What kind of devices are supported/required to run builds using .NET 4.x scripting runtime?
I'm currently targeting Android and iOS using legacy scripting runtime (.NET 3.5 equivalent - .NET 2.0 subset).
During my research I got the impression that changing the runtime (to .NET 4.x equivalent - .NET standard 2.0) will allow me to use more APIs and libraries at the cost of having fewer devices to target.
However, I can't seem to find how such a change affect the devices or even what determines whether a device will be compatible with the new runtime or not.
I've seen the table from this page, but I'm confused as to how a particular Xamarin version's compatibility translates to what Android/iOS version I can target by using .NET Standard 2.0 : https://docs.microsoft.com/en-us/dotnet/standard/net-standard
Here it's even stated that "Fewer Android devices support V8.0 than V7.0, so there’s also a tradeoff: access to more APIs or to more devices", but what constitutes those said devices https://blog.xamarin.com/history-dot-net-standard/
And in this page it is stated that Unity "has committed to supporting this profile across all platforms that Unity supports", but again, starting from which version? https://docs.microsoft.com/en-us/visualstudio/cross-platform/unity-scripting-upgrade?view=vs-2017
Can someone enlighten me on this?
Answer by ManieBesselaar · Nov 23, 2020 at 05:31 AM
Did you ever find an answer to this? I have been struggling with the same question. One thing that I did find useful is this page in the 2019.4 docs
which states that it is recommended to use .net 2 unless you are targeting features that are only available in the higher .net versions.
Cross-platform compatibility Unity aims to support the vast majority of
the APIs in the .NET Standard 2.0 profile on all platforms. While not all platforms fully support the .NET Standard, libraries which aim for cross-platform compatibility should target the .NET Standard 2.0 profile. The .NET 4.x profile includes a much larger API surface, including parts which may work on few or no platforms.
My conclusion, stick to .net 2 unless you know that you are using a feature that is only supported by a higher version. Hope this helps someone.
Answer by zerotouch · Apr 19, 2021 at 09:44 AM
I am also interested in the tradeoff by using .NET 4.x over 2.0 as the Newston Json library requires it that i would like to use (i could not find any other that supports multidimensional arrays :))
so my question is what devices/OS version i lose if i require .NET 4.x instead of 2.0