TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

.NET 5.0

791 pointsby benaadamsover 4 years ago

33 comments

mattmanserover 4 years ago
So, on the plus side with the new .net, I recently made a .net core web app on Linux, and generally it&#x27;s been pretty easy.<p>I&#x27;m also impressed at just how fast asp.net core is compared to asp.net, the time it takes to open your site in debug mode has dropped dramatically, from what used to be 1&#x2F;2 minute in asp.net to a few seconds in .net core.<p>On the bad side? Mainly the asp.net core team and their push for Dependency Injection and the really poor async code has got to be the most frustrating thing about the whole thing.<p>My biggest bugbear is the way you access your config, which is an absolute and utter kafka-esque mess. Because someone at MS was drinking the DI kool-aid you have to add a minimum of 5 lines of code to any class you want to access config values in, and you&#x27;re in for an even bigger nightmare if you want to separate business logic and web code into two projects (which is a pretty common design). I&#x27;ve given up with the config DI and just assign them all to static variables. I still don&#x27;t get why you&#x27;d even want your <i>config</i> injected!<p>The entire authentication uses async code too, which still has all the normal problems of being hard to debug, silently failing if you invoke it wrong and completely overwhelming the callerstack with a bunch of redundant calls.<p>Huge disadvantages with absolutely zero performance gains for 95% of programmers.<p>Having been using express again recently, I&#x27;m seriously thinking of ditching the asp.net core stack despite my general preference for statically typed languages. C# is great, but the asp.net core are so obsessed with shoving DI and async down your throat and making you write really unpleasant, boilerplate code. Feels like you&#x27;re back in 1990 with all the FactoryFactoryFactories.
评论 #25049385 未加载
评论 #25048316 未加载
评论 #25048329 未加载
评论 #25048192 未加载
评论 #25048211 未加载
评论 #25052273 未加载
评论 #25051302 未加载
评论 #25052035 未加载
评论 #25049500 未加载
评论 #25051495 未加载
评论 #25048566 未加载
评论 #25048183 未加载
评论 #25055242 未加载
评论 #25048221 未加载
评论 #25056438 未加载
评论 #25074773 未加载
评论 #25048373 未加载
评论 #25054516 未加载
评论 #25056413 未加载
评论 #25055715 未加载
评论 #25051920 未加载
评论 #25048344 未加载
评论 #25051417 未加载
评论 #25055226 未加载
评论 #25048219 未加载
nwah1over 4 years ago
Congratulations to the team.<p>Microsoft has made exceptional strides in terms of performance and compatibility.<p>The whole vision is what is really impressive, not any individual part.<p>It is cross-platform, open source, and has almost complete coverage of the old .NET APIs. The new csproj format is vastly superior. The new dotnet CLI is a pleasure to use.<p>Many of the surrounding libraries like ASP.NET, Kestrel, LINQ, Entity Framework Core, System.Text.Json, etc are best in class.<p>I look forward to the Linker becoming stable, as this will really help in contexts such as Azure Functions and AWS Lambda.
_accoover 4 years ago
The future is very bright for .NET. It has the right <i>raison d&#x27;etre</i> - .NET is part of the growth story for Nadella-Microsoft.<p>They already have you programming in their editors (VS&#x2F;Code) and pushing to their VCS (Github). They&#x27;re even teaching you the C# type system with TypeScript :) If they can just convince you to use their stack, Azure will win you over from AWS every time.<p>As a result, I really wanted to adopt .NET earlier this year. But they have some work to do to make the ecosystem approachable to newcomers.<p>One of the core issues feels so... trite. But experiencing it, I realized how real it really was:<p>The Names. Microsoft has created a Ninja Warrior obstacle course of proper nouns.<p>It is comical. It is worthy of parody.<p>.NET, the CLR, and their relation to C# and F#. ASP.NET, ASP.NET MVC, ASP.NET Web Api, Blazor vs Razor, .NET Core vs .NET Framework vs .NET Standard.<p>I think I could draw the lines between all those with about 50% accuracy. And I read like 3 books on .NET before diving in.<p>It&#x27;s bad off the top when you&#x27;re trying to figure out which way is up in the ecosystem. It goes from bad to worse when you&#x27;re looking through docs and Stack Overflow answers.<p>It was almost never immediately clear if a document I was looking at <i>on Microsoft&#x27;s own website</i> applied to me or not. That is a cardinal sin of technical documentation.<p>Ultimately, this meant that .NET Core Web API (or whatever I was using) felt poorly documented.<p>I&#x27;d find myself looking at docs that mention .NET Web API - but I can&#x27;t remember if that rolls up to .NET Core or Framework -- or both? Am I using MVC? Is Web API a subset of MVC? No clue.<p>It&#x27;s definitely a hard problem. Here&#x27;s to hoping that now that everything is unified, they can work on paving clearer roads into their ecosystem.
评论 #25053023 未加载
评论 #25054465 未加载
评论 #25053531 未加载
评论 #25055905 未加载
elamjeover 4 years ago
As someone who uses .NET daily, but loves Clojure and other functional programming paradigms - Records seem like a very compelling feature. Immutable data structures without any hassle to set up. Simply write “record” where you would normally write “class” and boom, you are working with immutable objects. This is one step closer to one the best features of Clojure IMO -everything is immutable.<p>Additionally, there seems to be another new way to accomplish this. Normally class properties are accessed via get; and set;<p>Now we have the ability to use get; and init; which effectively makes the object immutable&#x2F;read only after initialization. The syntax is just a little cleaner and more obvious to the reader how the property should be used.<p>C# has really been adding some great features the past few years and is certainly getting more expressive and concise which I appreciate.
评论 #25048297 未加载
评论 #25049821 未加载
评论 #25049156 未加载
modernerdover 4 years ago
F# gains string interpolation and typed string interpolation:<p><a href="https:&#x2F;&#x2F;devblogs.microsoft.com&#x2F;dotnet&#x2F;announcing-f-5&#x2F;#string-interpolation" rel="nofollow">https:&#x2F;&#x2F;devblogs.microsoft.com&#x2F;dotnet&#x2F;announcing-f-5&#x2F;#string...</a><p>Knew it was coming but still really happy to see this.
评论 #25051578 未加载
评论 #25053730 未加载
soapdogover 4 years ago
Congratulations to the team but more than a year after the Surface Pro X shipped and there is still no way to build desktop applications for aarch64 using dotnet&#x2F;vs2019 on the local machine. Windows on ARM has no native support for WPF, WinForms, or WinUI.<p>Visual Studio 2019 running as x86 32bits application can&#x27;t see the local machine as a target for aarch64 applications. When I asked microsoft, the response was to use a x86-64 machine to develop on the same LAN as the aarch64 machine and use remote debugging. So you need two machines to ship a desktop application.<p>This is bad, and part of the reason there are so few app running natively on the Surface Pro X.
评论 #25050069 未加载
评论 #25051090 未加载
Someone1234over 4 years ago
&gt; From what we’ve seen and heard so far, .NET 5.0 delivers significant value without much effort to upgrade.<p>From the previous version of .Net Core only. They&#x27;ve done absolutely nothing to make migrating from MVC 5 any easier, while proclaiming that this somehow merges .Net Framework and .Net Core. Going from MVC 5 to .Net 5.0 MVC is a complete re-write of the web layer from an empty project upon up (even according to their own article[0]).<p>I think the poor messaging on .Net 5.0 bugs me more than the actual work required for the mitigation (which hasn&#x27;t changed significantly). .Net 5.0 is just .NET Core 4 with a fancy new name.<p>[0] <a href="https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;aspnet&#x2F;core&#x2F;migration&#x2F;mvc?view=aspnetcore-5.0" rel="nofollow">https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;aspnet&#x2F;core&#x2F;migration&#x2F;mvc?v...</a>
评论 #25049709 未加载
评论 #25053016 未加载
评论 #25049067 未加载
评论 #25054123 未加载
SloopJonover 4 years ago
Note that .NET 5.0 is not an LTS release:<p>&gt; .NET 5.0 is a current release. That means that it will be supported for three months after .NET 6.0 is released. As a result, we expect to support .NET 5.0 through the middle of February 2022. .NET 6.0 will be an LTS release and will be supported for three years, just like .NET Core 3.1.
评论 #25051721 未加载
eatonphilover 4 years ago
I&#x27;m excited about this! I&#x27;ve used .NET Core to build some CLI tools for Linux in F#. It&#x27;s great to have an alternative to Go in terms of mainstream, high level languages (read: has tons of good libraries) that can compile to an easily distributed Linux binary.
bob1029over 4 years ago
Congrats to everyone involved. This is a huge accomplishment and arguably many steps in the right direction.<p>We are very excited to get our hands dirty with .NET 5 sometime in Q1 next year. We currently run on .NET Core 3.1. I expect our migration from 3.1=&gt;5.0 will be a total non-event, but we don&#x27;t want to risk any regressions during our current crunch phase. Our migration from 4.7=&gt;2.0 was the most difficult, but once we got everything off Framework and onto Core things have been going really smoothly with the incremental upgrades. Really hoping this trend continues indefinitely.<p>The only part of .NET 5.0 that has left me disappointed is the continued lack of polymorphic deserialization support in System.Text.Json - a la Newtonsoft.Json&#x27;s TypeNameHandling enumeration. This is the only thing holding us back from migrating to this first-party dependency. I have already left feedback regarding our use case in the appropriate dotnet&#x2F;runtime GH issue.<p>The biggest new features I am looking forward to are the performance enhancements surrounding startup time, GC, etc. Improved P95 latency is something that will be very welcome in some of our busier environments.<p>In terms of the overall package that .NET brings to the table, we couldn&#x27;t be happier. Sure, VS could run a little smoother and some of the configuration&#x2F;DI stuff can be very aggravating (at first), but overall its a fantastic experience.
评论 #25053081 未加载
hbcondo714over 4 years ago
&gt; .NET 6.0 will use the same approach, with net6.0, and will add net6.0-ios and net6.0-android<p>Huge endeavor and launch! Looks like mobile app development will be the same with Xamarin
评论 #25048171 未加载
评论 #25048093 未加载
maxpertover 4 years ago
With Linux support AOT compliation and other goodies I wonder how many people will prefer writing backends in .NET over Java.
评论 #25048060 未加载
评论 #25047909 未加载
评论 #25047894 未加载
xpressvideozover 4 years ago
It is a bit sad that so-called &quot;native AOT&quot; was not included in the release. When I heard last year that .NET 5 would support single-file binary, I expected it to be the same as something like Rust or Go would offer. But no, Microsoft changed the meaning of AOT and moved the goal post, introducing the real AOT as &quot;native AOT&quot;. Thankfully they are aware of the issue, so I hope to finally see in when .NET 6, which will also be an LTS release, is released.<p><a href="https:&#x2F;&#x2F;visualstudiomagazine.com&#x2F;articles&#x2F;2020&#x2F;08&#x2F;31&#x2F;aot-survey.aspx" rel="nofollow">https:&#x2F;&#x2F;visualstudiomagazine.com&#x2F;articles&#x2F;2020&#x2F;08&#x2F;31&#x2F;aot-sur...</a>
评论 #25056728 未加载
Siiraover 4 years ago
There is also going to be a crossplatform (including mobile) UI library for .Net 6: <a href="https:&#x2F;&#x2F;devblogs.microsoft.com&#x2F;dotnet&#x2F;introducing-net-multi-platform-app-ui&#x2F;" rel="nofollow">https:&#x2F;&#x2F;devblogs.microsoft.com&#x2F;dotnet&#x2F;introducing-net-multi-...</a>
Belphemurover 4 years ago
Does anybody knows if .NET 5.0 will be included in Windows as a Windows Update as the .NET Framework ?
评论 #25048454 未加载
评论 #25049049 未加载
mmd45over 4 years ago
the highlights are great. 2 lowlights: - HttpClient&#x2F;WebRequest ReadWriteTimeout is silently ignored which can result in infinitely hung sockets when doing synchronous network i&#x2F;o - System.Speech is unsupported
评论 #25048466 未加载
评论 #25048007 未加载
评论 #25052159 未加载
评论 #25055960 未加载
rattrayover 4 years ago
I wish the post was more direct that .NET 5 is the successor to .NET Core 4. I gathered this was the case but it didn&#x27;t feel clear that I don&#x27;t need &#x27;.NET Core&#x27; anymore to run .NET on mac&#x2F;linux.
评论 #25052158 未加载
评论 #25052253 未加载
szntbover 4 years ago
I really like where thing are heading with .NET.<p>On the other hand, I&#x27;m still missing an easier interop with other ecosystems. C# is an easy to use language and I would love to write some common code &#x2F; business logic &#x2F; whatever you name it in C# and expose it as webassembly and C&#x2F;C++, this would cover mobile, web and desktop workloads. You can do something like that with Rust (or at least they claim it, I never tried), but with C# I don&#x27;t see any _easy way_ doing it. I would be happy if someone could correct me If I&#x27;m wrong.
thrower123over 4 years ago
Maybe in a year or eighteen months, I&#x27;ll be able to move to this, from Framework code that still has dependencies that nobody has ever updated to .NET Core.<p>This version will be nearly out of support by then...
评论 #25057178 未加载
the_arunover 4 years ago
I know .NET Core applications could run on Linux. But do they natively (without any wrappers) support Linux OR is there a wrapper to simulate windows within Linux?
评论 #25048047 未加载
评论 #25056015 未加载
评论 #25049785 未加载
评论 #25057122 未加载
评论 #25056753 未加载
dotnethellover 4 years ago
Does Asp.NET identity still use a Guid for primary key? I remember it being hell trying to convert to int a few years ago which left a sour taste.
评论 #25049522 未加载
评论 #25049767 未加载
评论 #25051334 未加载
PretzelFischover 4 years ago
One day I would really like to see the ability to have C#, F# and other languages all in the same project.
评论 #25052126 未加载
ablekhover 4 years ago
Would most people here agree that .NET is a much better platform for developing applications with a plugin-based architecture (which, I think, more or less, implies following Hexagonal aka Clean Architecture &#x2F; Ports and Adapters Pattern [1]) than popular alternatives (e.g., Python, TypeScript&#x2F;Node.js) due to a diverse set of comprehensive dependency injection (DI) implementations [2]? While it is possible to use a manual &#x2F; non-DI approach [3], the trend seems to be in either extending this approach [4-5], or - an arguably more elegant and flexible solution - using DI [6]. Would love to hear opinions on how you would approach developing a heavily plugin-based application (including an ability to use virtualization containers, such as Docker, as functional plugins).<p>[1] <a href="https:&#x2F;&#x2F;www.infoq.com&#x2F;articles&#x2F;advanced-architecture-aspnet-core" rel="nofollow">https:&#x2F;&#x2F;www.infoq.com&#x2F;articles&#x2F;advanced-architecture-aspnet-...</a><p>[2] <a href="https:&#x2F;&#x2F;www.claudiobernasconi.ch&#x2F;2019&#x2F;01&#x2F;24&#x2F;the-ultimate-list-of-net-dependency-injection-frameworks" rel="nofollow">https:&#x2F;&#x2F;www.claudiobernasconi.ch&#x2F;2019&#x2F;01&#x2F;24&#x2F;the-ultimate-lis...</a><p>[3] <a href="https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;core&#x2F;tutorials&#x2F;creating-app-with-plugin-support" rel="nofollow">https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;core&#x2F;tutorials&#x2F;creat...</a><p>[4] <a href="https:&#x2F;&#x2F;github.com&#x2F;natemcmaster&#x2F;DotNetCorePlugins" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;natemcmaster&#x2F;DotNetCorePlugins</a><p>[5] <a href="https:&#x2F;&#x2F;maartenmerken.medium.com&#x2F;announcing-prise-a-plugin-framework-for-net-core-4af7cf5b4d2b" rel="nofollow">https:&#x2F;&#x2F;maartenmerken.medium.com&#x2F;announcing-prise-a-plugin-f...</a><p>[6] <a href="http:&#x2F;&#x2F;ewer.com.br&#x2F;plugin-architecture-with-di-containers" rel="nofollow">http:&#x2F;&#x2F;ewer.com.br&#x2F;plugin-architecture-with-di-containers</a>
评论 #25055055 未加载
评论 #25057095 未加载
mmd45over 4 years ago
is this an in-place update to the netcore3.1 runtime or does it install side by side for net5.0? just want to know what kind of risk it is to install. i got bit by the netfx48 in place update.
评论 #25049167 未加载
评论 #25048743 未加载
txdvover 4 years ago
Where did Java interop go?
评论 #25057007 未加载
mrlonglongover 4 years ago
Even more important, what&#x27;s been happening with .NET&#x2F;VB?
评论 #25060607 未加载
iso8859-1over 4 years ago
People who think this is actually cross-platform need to consider these points:<p>* Debian can&#x27;t package F# because it is built using MSBuild, and MSBuild is built using MSBuild. How can it be Microsoft doesn&#x27;t have the resources to get it into a major distribution?<p>* Microsoft won&#x27;t commit to maintaining any cross-platform GUI libraries. You will be relying on some random community project. Compare this with e.g. Python with PySide, which is officially supported by The Qt Company. The Qt Company is 460 times smaller than Microsoft, and they still manage.
评论 #25049626 未加载
评论 #25049186 未加载
评论 #25051917 未加载
francislover 4 years ago
Since Apple is announcing the new Macs with M1 SoC today, I&#x27;m wondering if it will support it from day 1 or we will have to wait?!<p>edit:<p>I guess I can&#x27;t read. `We expect that Apple will announce new Apple Silicon-based Mac computers any day now. We already have early builds of .NET 6.0 for Apple Silicon and have been working with Apple engineers to help optimize .NET for that platform. We’ve also had some early community engagement on Apple Silicon (Credit @snickler).`<p>Still wondering for .net 5 though
评论 #25057188 未加载
acalzycalzyover 4 years ago
I’m just excited to see NET 5.0 things when checking to see windows os upgrades.<p>I have no idea what it means or the significance of it.
spoonspoon2over 4 years ago
You can now write very short functions in C#:<p>int Factorial(int n) =&gt; n is &lt;= 1 ? 1 : n * factorial(n -1);
sytelusover 4 years ago
Seems like .Net 6 will have cross-platform UX forms! That sounds very exciting.
deostrollover 4 years ago
I used to be an asp.net developer before. I appreciated the idea behind asp.net during its early years - making websites fast and with templating (or scaffolding). Later realized that it is bloat.<p>Then asp.net mvc happened, a whole new paradigm shift. But then I disliked the idea of stuff getting inherited from somewhere. *.cshtml files and all. Soon I realized what the ide is actually doing behind the scenes. For e.g. the cshtml files are compiled and there is an intermediate binary format I guess. (Don&#x27;t remember well).<p>This is why I came to like something like express. Guaranteed there is no type safety. (JavaScript is a dynamic language). But I enjoyed the simplicity of it. Ever since I have moved away from the .net platform.<p>I know this code generation and intermediate binary forms are necessary. But at times I was surprised by it. You find the similar stuff for other stuff you write for e.g winforms, windows presentation apps, etc. I realize there is no other alternative way for such platforms. But I generally disliked the idea that my editor does a lot of stuff behind the scenes. This makes me too dependent on the editor. For e.g. try making winforms app with just notepad. It&#x27;s not impossible; just very cumbersome.<p>I have respect for .net. In fact I do write console programs time to time. But I wish stuff was as simple as having a plain editor and getting started.
评论 #25051581 未加载
评论 #25048509 未加载
评论 #25055023 未加载
评论 #25048881 未加载
dustinmorisover 4 years ago
&gt; It’s already in active use by teams at Microsoft and other companies...<p>This means nothing anymore. MSFT says that about everything they release and users are still often left with the feeling that they are guinea pigs testing a very unfinished product.<p>&gt; For Visual Studio users, you need Visual Studio 16.8 or later to use .NET 5.0 on Windows and the latest version of Visual Studio for Mac) on macOS. The C# extension for Visual Studio Code already supports .NET 5.0 and C# 9.<p>Reading this makes me wonder who is still using Visual Studio. That IDE is so bad it&#x27;s beyond believe. .NET 5 is a standalone runtime which anyone can install. You can write C# in a text editor and build and run it from the command line. Why the hell do Windows developers need to install an entire new IDE in order to use the latest version of the .NET runtime? It&#x27;s ridiculous beyond belief.<p>Really shows that Visual Studio Code is the future. All you have to do is install the latest runtime and update the plugin so it shows you suggestions for all the latest language features. No need to install a new version of Visual Studio Code itself.<p>&gt; .NET 5.0 is the first release in our .NET unification journey.<p>This might cause confusion. .NET 5 is basically .NET Core 3.2 but has been renamed to .NET 5 so that .NET Framework 4.x users can finally get convinced to move to .NET Core. They just dropped the Core to make it look more appealing to them, but it&#x27;s still .NET Core.
评论 #25050001 未加载
评论 #25047979 未加载
评论 #25048260 未加载
评论 #25048078 未加载
评论 #25048230 未加载
评论 #25047963 未加载
评论 #25049089 未加载
评论 #25048030 未加载
评论 #25048072 未加载