At a superficial level (my limited understanding) Net Standard 2.0/2.1 should be something older than .NET 4.x, but it seems these are two different things, and I have no idea what’s newer/better, or why/what.
Can someone speak to me as though I’m a complete imbecile and know nothing about the .NET, Net Standard etc world… cause that’s where I’m at.
Sorry to clog forums with this. My searches on google only led to more confusions.
.NET Framework was started back in early 2000s, and went from many, many revisions. The latest version in .NET Framework 4.8.
At the same time, there were other forms of .NET that emerged, like .NET Core, .NET Native, Xamarin products, etc. It was wild west for a little while. Then Microsoft decided to create a thing called “.NET Standard”, which defines a .NET API surface, which different implementations can implement. The important piece is that .NET Standard isn’t a specific runtime, it’s just a list of APIs that a runtime has to implement to be called .NET Standard compatible…NET Framework API surface is bigger than .NET Standard, but they don’t have perfect overlap.
Now, when it comes to Unity, the API Compatibility level setting specific which API surface you want to target. We allow two choices: .NET Standard and .NET Framework. Generally, .NET Standard has better cross platform compatibility as many non-common APIs in .NET Framework aren’t implemented on non-desktop platforms, but it has less .NET APIs available. .NET Framework remains an option if you want to use APIs that aren’t available on .NET Standard on platforms that do implement them.
Generally, I would suggest using .NET Standard and only change to .NET Framework if you absolutely need to.
I am so very glad I asked. And incredibly grateful you’ve taken the time to clear this up.
THANK YOU!!!
A good long while back, I read somewhere about .NET 4.x in Unity giving better performance, and went “up” to that.
There was a bit of a speed boost in Play Mode, but there’s always been these foibles in builds that I couldn’t track down, because I never thought it would be .NET 4.x as I’d wrongly presumed this was the better, newer, all singing, all dancing, ONE, and that I’d have to fix all those foibles in builds later on.
It never once occurred to me that I should roll back to Net Standard 2.0
Then, just today, I noticed that the great Keijiro has been using Net Standard 2.0 and 2.1 for his more recent experiments. Knowing he’s cutting edge, I found this odd. So thought I’d best find out what is what in this crazy world of .dots and Nets and NETS and Frameworks and Standards and 2’s and 4’s.
I hope there’s not too many others like me that have naively pushed up to .NET Framework 4.0 etc.
Do you think it might be a typo, that they meant to write game, but were so busy talking about libraries of APIs that the word was on their brain for too long?
Just to chime in on my findings on this discussion. From the site (.NET Standard | Common APIs across all .NET implementations) “.NET and .NET Core” was mentioned and I was confused whats the difference between .NET and .NET Core turns out MS renamed .NET Core to .NET when they updated from .NET (Core) 3.1 to .NET 5. They skipped the numbering “4” to avoid confusion with the .NET Framework numbering (.NET Framework version uses 4.x). So basically .NET Core and .NET they refer to the same thing (now).
There shouldn’t. Individual APIs might have different perf characteristics in rare cases, but overall game performance differences won’t be observable.