Hacker News new | past | comments | ask | show | jobs | submit login

I know I've over simplified this for myself. But the way that I look at it is like so.

.Net Standard is an "Interface" - No implementation behind the scenes just a list of apis.

.Net Framework, .Net Core, Xamarin are all "classes" or implementations of .Net Standard.

ASP.NET Core only relies on .NET standard which is implemented by both .Net Framework and .Net Core. Which means it can run on both.

ASP.NET (Framework) does not rely on .Net Standard but directly links to the implementation of .Net Framework. Which means those libraries can't run anywhere and are instead limited to only .NET Framework.

I'm no Jon Skeet, or tech guru. So please take this explanation with a grain of salt and if I'm wrong correct me as needed. This is just how I've wrapped my head around it.




David Fowler (Microsoft engineer on ASP.NET Core) posted an "analogy in C#" gist a couple years ago that is similar to yours, but in code. It's a couple years old so is a bit out of date at this point, but the basic idea holds.

https://gist.github.com/davidfowl/8939f305567e1755412d6dc0b8...


This is correct. .NET Standard as the name implies is the standard by which each framework tries to match. If you make any libraries that are .NET Standard compatible they will run everywhere. They used to have "Portable Class Libraries" but that was a mess. Also .NET Standard wasn't as good till recently thankfully. The earlier days were a mess since not everybody (framework) supported certain things.


That was perfect.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: