Clarity on .NET Standard, Base Class Libraries, Runtime and .NET 5? #50729
Replies: 1 comment 3 replies
-
A1: Yes, if you are talking about the dotnet/standard library. A2: Xamarin/mono was originally third party and only implemented part of them. .NET Core/.NET for Windows Store was cut from .NET Framework and dropped some functionalities. A3: For versions before 2.0, the standard was defined by finding the common intersects the platform and interfaces have implemented, in order to unify them. 2.1 was asked to be implemented by actively developed ones(.NET Core and Mono) A4: It's the implementation of all first party APIs, more than .NET Standard. A5: Yes A6: .NET 5 consolidates two things: A7: .NET standard is built from dotnet/standard repo. I remember there was it's building infrastructure in runtime repo, but removed. A8: I'm not sure what you are referring to, but you are probably wrong. A9 A10: .NET Core was forked from .NET Framework, then involved independently. The codebase contains abstraction layer (like #define) for different OSs, and the majority of code is platform.independent. A11: Right. When time gets closed to release, a new branch is created for the release and patches will be commited onto it. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have come across this below the image in this URL: https://github.com/dotnet/designs/blob/main/accepted/2020/net5/net5.md.
This is my understanding until now:
.NET Standard and Base Class Library:
.NET Standard will provide principles and definitions of the .NET Standard. Code implementation is not written in .NET Standard https://github.com/dotnet/standard
Q1. Is my assumption right as I did not find any code in this repository and found only abstracts of them?
In many articles it's said that .NET Standard is introduced to avoid fragmentation and can share the same codebase by different .NET platforms which didn't give much clarity on how things changed at the repositories level.
Q2. Is it like in the beginning all platforms of .NET like .NET framework, Xamarin, .net core had different functionalities based on their needs?
Q3. Then .NET standard library was introduced and defined all these basic components and asked all these platforms to implement .NET standard library principles and definitions. Is this correct?
Q4. Is Base Class Library(Core Library in .NET core) block in the above image represents the implementation of .NET Standard or its different?
Based on Q4's answer I have further doubts.
Q5. Is CoreFX repository the Base Class Library of .NET Core before or its different?
Q6. Now in .NET 5 instead of having multiple implementations, there will be only one code base for all. Is this correct?
Now I can find the code base for System.Collections.Generic, System.Data etc in https://github.com/dotnet/runtime repository which will produce a package called Microsoft.NetCore.App as mentioned in the following link Consolidating .NET GitHub repos announcements#119.
Q7. But when I look into the DLL's folders I can find these DLL's in both NETStandard.Library and Microsoft.NetCore.App folders in C:\Program Files\dotnet\packs. So, is there a separate repository for NETStandard.Library package or is it produced just based on build configuration?
In both NETStandard.Library and Microsoft.NetCore.App I found Microsoft.Win32.Primitives.dll, System.dll, etc which have classes like Dictionary which will be platform dependent as it is only for windows if I am not wrong.
Q8. Is it not only windows DLL, if so then why is it part of the NETStandard.Library and Microsoft.NetCore.App as both needs to be portable and cross-platform or it's cross-platform because it has implementations for multiple platforms like using if-else or platform support attributes etc to behave based on platform type?
JIT and Runtime
Now in .NET 5 is platform-specific code from Mono and .NET framework is being moved into .NET Core to make .NET Core(CoreCLR) support all platforms being a single code base.
Q9. Is my assumption correct?
Q10. Is this being achieved using if-else conditions and platform support attribute to behave based on platform type?
General:
How is code for different versions maintained in the repository? Ideally, one branch for each .NET version released and one that is being developed.
Q11. If my assumption is right can you please provide some information about it?
Appended
Comparing C:\Program Files\dotnet\packs\NETStandard.Library.Ref\2.1.0\ref\netstandard2.1 and C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\5.0.0\ref\net5.0 is net5.0 has many DLL's(251) compared to netstandard2.1(122). This is probably because .NET Standard is built long back and is not being updated now and .NET core is being updated instead of .NET Standard and from now on .NET Standard is continued as .NET 5.0 BCL.
Q12. Is the above assumption correct?
NOTE: Maybe many of my questions would have been answered online somewhere but I am currently in a confused state and not sure if my understandings are right, so wanted clarity here.
Beta Was this translation helpful? Give feedback.
All reactions