.NET Standard 2.1
blogs.msdn.microsoft.com
blogs.msdn.microsoft.com
- .NET Core will soon run all three UI technologies of modern Windows UWP, WinForms and WPF (.NET Core 3). - The Windows Compatability Pack for .NET Core shifted some popular .NET Framework libraries to .NET Core (some only on Windows).
There are one thing, Microsoft is really bad with: Telling the world that something is deprecated. There is a set of technologies in the .NET Framework which have no future: AppDomains, WCF, Code Access Security, Workflow Foundation, Cardspace, ... (just to name a few). They are all already dead for some years, but no one tells. They are supported in the .NET Framework but no progress happens. And .NET Core will never see them.
There's no reason to deprecate a mature product if there's need for it, it has sufficient test coverage, and there's low/no maintenance. There is however a risk involved with deprecating them that users will migrate to another technology stack entirely.
WCF is one of those technologies that was deployed heavily in Enterprise and is deeply ingrained in applications and systems going on a decade old. WFC has better support for SOAP than anything I've seen in the open source world and with a minor configuration tweak it can simultaneously support JSON from the same endpoint.
Workflow Foundation is in a similar state to WCF, though I wouldn't shed a tear if it vanished off the face of the planet.
Code Access Security and Security Transparency aren't supported on .NET Framework either
- .Net API Specification - (now known as .Net Standard)
- .Net Windows - (now known as .Net Framework)
- .Net Cross Platform - (now known as .Net Core)
Regarding ".NET Standard", I agree, it is an API specification but to prevent confusion you should think (for now) of it as "The .NET Standard [API set]".
Does it exist somewhere?
https://docs.microsoft.com/en-us/dotnet/framework/whats-new/
Only goes down to 4.5, as older versions are already EOL.
The archived MSDN docs do have the older versions in case you are interested.
Which runtimes implement which versions of .NET Standard:
https://docs.microsoft.com/en-us/dotnet/standard/net-standar...
At some point, is it reasonable to expect Xamarin, Mono, Unity, and .NET Core to all really be backed by .NET Core? And if/when so, is there any difference between .NET Standard and .NET Core since, after .NET Framework has been essentially maintenance-mode'd, there will be only one .NET Standard implementation? Similar question, besides just having multiple implementations, what benefit is there to having both Mono and .NET Core separate (at least for the .NET Standard impl part)?
https://docs.microsoft.com/en-us/dotnet/standard/net-standar...
in terms of naming, i think it makes sense to keep the distinction between .net standard and .net core, even if .net core slowly heads towards becoming the de facto implementation. i doubt .net framework and mono ever really go away anyway, so the distinction is still needed.
.NET Core has a sub project named corefx (Base Class Library), which acts as a master for most of the class library of Mono nowadays. However, the runtime below (mono or coreclr for .NET) are different animals. Mono is highly optimized on portable code (it runs in many more places than .NET Core) while .NET Core is tuned for performance.
Unity is based on Mono but also has yet another different runtime (it basically compiles the code first in C++ and then with C++ backends to the target architecture). Expect here the same as for Mono. It is specialized and will stay specialized.
In this cases you need a standard but not a shared implementation.
This week we've already had a new asp.net core which drops support for .net standard and only supports .net core.
And now, a new version of .net standard that .net fx isn't going to support.
We are right back at the mess of portable class libraries with all their different supported profiles.
It means app devs are constantly dealing with problems like "is this library I want to use, supported by all the targets my app needs to run on", and library devs have a mess of different frameworks and combinations to support, so inevitability drop a few of them unless they are a big project with lots of manpower.
.NET Standard is not a intersection. It is a small bubble being in a bigger bubble. And the biggest bubble is the latest. The reason Miguel and the Unity folks are so important in this process, is the fact that they have to agree to participate in the latest and biggest version of the Standard.
- .Net Framework: The Windows Specific (and nearly deprecated) branch
- .Net Core: The replacement for Framework and cross platform branch (but with Windows specific libraries)
- .Net Standard: A way to write something that runs on both .Net Framework and Core?
Note that executables cannot be compiled to .NET Standard, because they are self-bootstrapping so they must target one or the other (or both).
.NET Framework 4.8 won't implement .NET Standard 2.1 doesn't mean .NET Framework won't implement new .NET Standard versions.
.NET Framework has been announced previously to be slower-movinh and lower-risk than Core, so it's not surprising that it will take longer for it to support new versions of .NET Standard. That the next Framework release won't incorporate the newest Standard doesn't mean Framework won't advance it's Standard support going forward.
The "slower" explanation doesn't really fit with that sentence to me... if Standard 2.1 already has things that Framework "cannot" have, then it seems like "stopped" is more accurate than "slower." I guess technically they only are saying that Core gets things Framework can't, not necessarily the standard, but I'm not sure that's much of a distinction in practice.
Of course it doesn't have to mean that Framework is just frozen but it would seem to make the Standard a bit of a dead letter (I'm not really familiar with how useful it is in terms of Xamarin/Mono/Unity).
Yeah, I think the question is "will Framework be the slow moving, but 'living' component you target for long-term, but perhaps not eternal, stability on Windows platforms or will it be a legacy component that Windows is burdened with only for backward compatibility with older apps".
I think Microsoft has sent signals out which point in each of those directions, but not yet converged clearly on one or the other.
It would be great if they better articulated that "probably not ever", but I can't blame them for not doing that when we all know that a bunch of enterprise devs and HN/Reddit/Slashdot randoms would be out in force with pitchforks and torches if they did.
> In several fields, deprecation is the discouragement of use of some [..] feature
Microsoft are currently telling people for new projects only use .Net Framework if you have a specific requirement, otherwise use .Net Core. .Net Core is therefore the default choice.
That to me is discouragement which starts to put .Net Framework into the realm of depreciated. Is it deprecated yet? It is not, but it is definitely going in that general direction and you can see it on the distant horizon.
Microsoft also has the entire silent iceberg of enterprise development that is going to be slogging along with .Net framework applications for years and years. Billions of lines of code that work as is, and just are not going to be invested in to update them.
(.NET Core on Azure seems pretty easy to me. Even from early beta days of .NET Core, but there are certainly even more Azure tools for it today than then, including some really good .NET Core on Docker support from what I hear.)
Yes, enterprises will always be slogging along with ancient solutions so long as "if it isn't broke, don't fix it" aligns with the bottom line. Arguably that seems exactly why .NET Framework might not support .NET Standard 2.1+, because Microsoft doesn't want to accidentally break ancient enterprises if they can avoid it.
If you ask Microsoft, they'll currently tell you otherwise, but that's because that's a bad idea from a marketing perspective. You don't let your customers know you're going to end of life your product that they used for 15 years until you have absolutely no other choice.
Standard = an API set. If you know OO in C# or Java this is effectively analogous to an interface.
It's the smallest common denominator of various implementations.
.NET Core = the new implementation
.NET Framework = the old implementation
Sadly things are not looking good for standardization - on one hand we have new netstandard without netfx and on the other aspnet.core without netstandard (https://github.com/aspnet/AspNetCore/issues/3753).
i.e. if .net core would run anything that could've run on .net framework/mono whatever by just retargeting to .net core 3.x and even dlls from .net 4.7 could be run on core 3.x than nobody would complain and people would love it since, it would reduce the pain of that many runtimes.
(Also, it looks like ASP.NET Core still should be considered .NET Standard 2.1 compatible, but yes the "upgrade" to .NET Standard 2.1 is fascinating because it loses compatibility with netfx.)
Not quite. There is a grand total of three different major versions of the VM on Windows:
CLR 1.0 - used by .NET Framework 1.0 and 1.1 CLR 2.0 - used by .NET Framework 2.0, 3.0 and 3.5 CLR 4.0 - used by .NET Framework 4+
These can all be installed side-by-side, and any particular .NET application is bound to a particular CLR version.
The differences between 4.0 and 2.0 are far more minor than the ones between 2.0 and 1.0. 2.0 added a bunch of changes visible on IL level - most notably, generics, and all the new IL opcodes and metadata to support them. 4.0 was mostly internal improvements - better JIT, GC etc. But there were also some new features, like NoPIA and "uncatchable" exception types (StackOverflowException etc), and a new CLR hosting API that allowed it to be hosted side-by-side with old frameworks in a native app.
The .NET Framework is, from Microsoft .NET and WIndows Team perspective, a legacy burden which is unable to innovate, change or improve due to the deployment methodology. It is a dead end.
I know, it sucks. I am an enterprise developer and understand the consequences. I hate it as well, but I can completely follow their rationale. They make it possible for us to develop WPF and WinForms on .NET Core which is their strategy to compensate the blow they give us.
And we still have lots of them that until now haven't cared much about .NET Core.
> > Are there plans to support .NET Standard 2.1 in a future version of .NET Framework, or will 2.1 and beyond be .NET Core only?
> Never say never, but given that .NET Standard is accumulative, I don't think it's very likely as the risk argument that applies to .NET Standard 2.1 will always apply to future versions too. And a side-by-side release of .NET Framework is extremely unlikley.
[0]: https://twitter.com/terrajobst/status/1059517534049726464
> (Span<T> is) at the heart of most performance-related improvements in .NET Core 2.1. Since it allows managing buffers in a more efficient way, it can help in reducing allocations and copying. We consider Span to be a very fundamental type as it requires runtime and compiler support in order to be fully leveraged.
Small struct that is declared as
public readonly ref struct Span<T>
{
private readonly ref T _pointer;
private readonly int _length;
...
}
which is exactly what I am using in Sciter (https://sciter.com) for 10+ years: template <typename T>
struct slice {
const T* start;
unsigned int length;
...
}
https://github.com/c-smile/sciter-sdk/blob/master/include/au...Such small thing definitely speed ups many areas and surprisingly quite a lot, parsing in particular.
Nothing new under the Sun, eh?
I get it, similar concepts - but let's not dismiss the value in this addition.
It is used strictly in read-only places. It makes absolutely no sense to use things like std::string (and allocate it each time) when you need to pass string or fragment of string or array to consumers.
For write-only access I also have target<T> that safely wraps all memcpy, memmove, strcpy[_s] cases.
It reincarnated quite many times: in D language by Walter Bright where arrays are just such slices. Or by Andrei Alexandrescu in its range<T> thing: http://www.informit.com/articles/article.aspx?p=1407357&seqN...
The Slice is just an address of memory chunk combined with the length of that chunk. That's somehow better than "C strings" - that are just pointers and so you need to do some computation if you need to get length of the string. Such C strings have too many drawbacks - in particular strtok function that modifies input string (that shall be read only all times).
Wrong. It will be pointer-to-pointer.
Reinterpretation (to treat struct as a pointer to C string) is only possible if you have something like this:
struct BSTR {
size_t length;
WCHAR chars[N]; // N is length + 1
};
and you return pointer to chars[0]. This is so called Basic string - BSTR is a WCHAR* pointer to memory location prepended by string length field.And I bet Sciter is younger than any of them.
Modula-3 version:
GENERIC MODULE Slices(T)
TYPE
Slice = RECORD
start : REF T; (* If you want the GC out of the way, replace with UNTRACED REF T*)
length: CARDINAL;
...
END;
END Slices;
Or one could simply use open arrays: TYPE
Slice = ARRAY OF T
Eiffel version: expanded class Slice[T]
start: detachable T;
length: INTEGER_32;
...
end
Naturally, one would use Array[T].slice() instead.http://smarteiffel.loria.fr/libraries/api/lib.d/storage.d/lo...
public readonly ref struct Span<T>
{
private readonly ref T _pointer;
private readonly int _length;
...
}
But the important parts are not _pointer or _length. Most of the implementation effort went into the `ref struct` part, which was released at the same time as Span<T> and is precisely what makes Span<T> powerful. It is a big thing.JRE, JDK, Java EE, Java SE, Beans, Enterprise Beans, Managed Beans, JEE APIs vs Implementations etc, containers, app containers, app servers.
'Enterprise' has to be the worst prefix/name ever for an API or technology.
It is a tough contest.
I actually don't care very much if they're actually the same code base, but I'd like to be able to use the dotnet CLI for everything. Xamarin project templates in the new SDK format are also on my wishlist.
And here's a more recent update: https://www.mono-project.com/docs/about-mono/releases/5.0.0/...
But although it's possible, I imagine there are lots of reasons why MS, or certain teams at MS, don't want it to happen. We'll see, though. I didn't expect them to make the decision to add WPF and WinForms support to .NET Core, but they did.
Does anyone know?
The "desktop app packs" for WPF and WinForms Microsoft has made very clear that they will not support anything other than Windows. (They also won't directly be a part of .NET Core according to diagrams, but packages installed on top of it.) It's also unclear if they can be open sourced (they probably cannot be), and if they can't be open sourced it is unlikely a community-led effort could easily work on making them cross-platform.
WinForms work quite nice on Linux with Mono. Won't they cooperate?
That said, this may still be a great opportunity for .NET Core to encourage trying Mono in its documentation for enterprises looking for cross-platform support. (Hopefully they already knew about Mono by this point, but an extra push won't hurt.
-Edit-
I should add that the purpose of them adding this capability isn't to set up a new cross-platform UI suite. It is just to lure enterprise shops to .NET core by supporting more of their .NET Framework workloads
Then again they'd also lose the Windows vendor lock-in, which might still be more valuable to them.
Then again they could sell their development toolchain and gain developer sympathy.
Think if it this way. Someone could write a .NET Core wrapper round the MacOS GUI libraries and platform APIs, but you couldn’t run that on Windows.
https://github.com/qmlnet/qmlnet
It is stable, I'm currently using it in production (https://medxchange.com/4klear-all-in-one-camera-recorder/)
PS: I'm the author.
Are there others I am missing?
even better would be "specification" rather than "standard", the later being a word frequently used to indicate a particular version of some thing.