Live data from Hacker News

.NET 6 Released

devblogs.microsoft.com

241–250 of 428 posts

Re: .NET 6 Released

#241

Earlier quoted context omitted.

Why would you want to style standard controls in a desktop app? They should look the way they look everywhere else in the OS.

Windows has multiple competing standards in the same OS, even from their own software distributed with the OS. It’s embarrassing.

It is, but there's still a standard system style that the majority of the apps are expected to use. Which is exactly what WPF uses - it's fairly easy to see if you take a WPF app and observe the differences on Win7/8/10.

In any case, surely, adding yet another different style only makes the problem worse.

Re: .NET 6 Released

#242
post #227
post #44

Earlier quoted context omitted.

There is no GAC. > .NET Core and .NET 5 and later versions eliminate the concept of the global assembly cache (GAC)

Surely the binaries generated by the JIT still get cached somewhere?

you can set a ReadyToRun flag on publish which pre jits your dlls https://docs.microsoft.com/en-us/dotnet/core/deploying/ready...

Re: .NET 6 Released

#243
post #3

I would personally prefer you to fix the multitude of things that don't work well in Visual Studio and library issues that are continually pushed back as "won't fix" or "upgrade to .Net5/6" as opposed to always racing forwards to the horizon. Even those of us who are actively migrating applications are stuck with web forms, netfx and dotnet core 2/3 and will be for years, so it would be nice that we felt some love ra…

Why can’t you upgrade to the latest version? Sounds like tech debt. And Visual Studio is almost dead, why aren’t you on Visual Studio Code?

… huh? Visual Studio is extremely not dead, they are literally about to release a 64-bit version after a massive rework. VS Code is a text editor which you can extend into being an IDE. Visual Studio is an IDE.

There are many reasons why one might be unable to upgrade to the latest version of any given thing. For an example close to my heart of why one might be unable to upgrade to .NET 6 (or indeed to later versions of the .NET 5 SDK), there's the showstopping https://github.com/NuGet/Home/issues/10389.

Re: .NET 6 Released

#244
post #216

We recently got through upgrading a large code base from .NET framework to .NET core 3.1. It was quite challenging as it seemed to touch every corner of .NET including AppDomains, .NET remoting, serializing type information, C++ interop which requires environment variables to be set in process (that one is very obscure), etc, etc. In any case, the performance results were really outstanding (particularly vs Mono) esp…

> In any case, the performance results were really outstanding (particularly vs Mono) Interesting. Do you have measurement results? According to my measurements the difference is not that big, see https://www.quora.com/Is-the-Mono-CLR-really-slower-than-Cor... , especially the section Update September 15th.

Yes. Back to back runs were performed on identical hardware. The results varied depending on input but .net core universally outperformed mono 6.8 on Linux - in one case by 35%. This is quite encouraging since quite a bit of time (again depending on input) is spent in native code (where .NET is essentially idle).

Re: .NET 6 Released

#245
post #118
post #79

Earlier quoted context omitted.

C# is fast and .NET core is cross-platform. It's good for games, web, and mobile development. F# is a great functional programming language. There are fun tools like SignalR (easy websockets), Blazor (write C# and run it in the browser through WASM), and LINQ (built right into the language and allows you to query objects like a database). Toplevel programs should make it easier to experiment with C# if you're interes…

> and LINQ Shudders at memories of coworkers writing giant, ridiculously inefficient LINQ queries without understanding how it's actually using the database and what it's doing server-side > Toplevel programs should make it easier to experiment with C# if you're interested. Definitely interested in that small feature :) If I had extra time I'd like to see what it takes to brew install dotnet and write a simple CLI pr…

> Can .NET deploy a static binary nowadays?

You can, as sbelskie mentioned below. In .Net 6, it's available as a Preview [1]. But it's going to ship with the main framework in 7.0 [2].

The preview works quite well. You can build self-contained, smaller executables, and shared libraries callable from say, C code.

[1]: https://github.com/dotnet/runtimelab/blob/feature/NativeAOT/...

[2]: https://github.com/dotnet/runtime/issues/61231

Re: .NET 6 Released

#246
post #55

Is it possible to load ".NET Framework" assemblies into ".NET 6" applications? (We have a lot of .NET Framework libraries, shared between different applications, and a complex dependency graph between them. So I'm wondering if it is possible to migrate away from .NET Framework by starting with the executables and working our way down the dependency graph.)

Yes you can, you simply add them as project references. We have done this in production and it works quite well.

You have to be careful though because you could get runtime crashes if they try to access stuff that is not supported in .NET 6 (mostly Windows-specific libraries).

I'd recommend running this guy on the code base, it'll give you a good idea of how much a pain it will be: https://docs.microsoft.com/en-us/dotnet/standard/analyzers/p...

Re: .NET 6 Released

#247
post #215

Earlier quoted context omitted.

> Can .NET deploy a static binary nowadays? You can bundle everything in a single file but that file contains the runtime, so even small Hello World apps are 50MB+ last I checked, though there have been some improvements recently with trimming and AOT is hopefully coming next year with .NET 7.

Very cool, thanks for answering. Yeah I understand they'd have to bundle the runtime so that makes sense. Glad to know they're working on improving that use case as well.

They're really working on reducing the compiled (app + framework) size in order to make the WASM target in browsers more viable for Blazor.

Re: .NET 6 Released

#248

Earlier quoted context omitted.

Discriminated unions is one of those features that everyone talks about, but never gets championed. Wish C# 10 already had this feature. https://github.com/dotnet/csharplang/discussions/2962

you can actually do them pretty easily in C# without language support anyways. for instance, the F# example from https://fsharpforfunandprofit.com/posts/designing-for-correc... can be done in C# like https://gist.github.com/keithn/ceeeed5f7eb567e1b2333747065d1... almost similar amount of code, however, no exhaustive checking. Not that I find that to be much of a problem, but it would be nice

But who needs sum types when you have the visitor pattern :troll_face:

https://blog.ploeh.dk/2018/06/25/visitor-as-a-sum-type/

Re: .NET 6 Released

#249
post #24

> In .NET 6, in-memory single file apps have been enabled for Windows and macOS. In .NET 5, this deployment type was limited to Linux. You can now publish a single-file binary that is both deployed and launched as a single file, for all supported OSes. Single files apps no longer extract any core runtime assemblies to temporary directories. This is a great! Now I can publish statically linked executables and run it e…

[deleted]

Re: .NET 6 Released

#250
post #24

> In .NET 6, in-memory single file apps have been enabled for Windows and macOS. In .NET 5, this deployment type was limited to Linux. You can now publish a single-file binary that is both deployed and launched as a single file, for all supported OSes. Single files apps no longer extract any core runtime assemblies to temporary directories. This is a great! Now I can publish statically linked executables and run it e…

[deleted]
Post reply on HN