My favorite .NET 10 feature so far is not within the .NET library itself, but `dotnet tool exec` to run C# files as scripts without a build step. This has been available in F# for a long time via `dotnet fsi`, and for C# also via the third party cs-script tool. It took a surprisingly long time to officially reach the primary .NET language! I only really wish C# would’ve been directly integrated as an alternative scri…
"dotnet tool exec" is not that feature; you're thinking of https://devblogs.microsoft.com/dotnet/announcing-dotnet-run-... which they added to "dotnet run". "dotnet run my-cool-thing.cs" "dotnet tool exec" is so you can run third party command line tools like csharpier that previously required "dotnet tool install" before you could use them. For example, in https://csharpier.com/docs/Installation you can now simply d…
.NET 10 Preview 6 brings JIT improvements, one-shot tool execution
161–170 of 231 posts
Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution
#162Earlier quoted context omitted.
The issue was in the beginning they didn’t think interop with C/C++ was value add. People complained and they added “Managed C++” which unfortunately influenced C++03’s design a lot. It wasn’t until C++11 that Microsoft gave up. You couldn’t effectively interop with C++ without writing a managed C++ wrapper, which only worked on windows. They added support for P/Invoke to aid in Win32 calls (shell.dll, user32.dll) as…
You are jumping over a few facts there. P/Invoke was born as J/Direct on J++, it became P/Invoke after the lawsuit, and Cool project turned into C#. Managed C++ Extensions in .NET 1.0 got replaced by C++/CLI on .NET 2.0, it was a .NET Core 3.1 milestone to support it, and has recently been updated up to C++20, minus modules. Still heavily used among .NET community on Windows. Meanwhile the native C++/CX and C++/WinRT…
Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution
#163Earlier quoted context omitted.
I guess LinqPad will lose some users to this feature.
This isn't LinqPad's selling point. All that dotnet run *.cs has done is remove the need to have a project file for each "script" you write. LinqPad maybe has this feature but it's selling point is as a scratch pad to experiment with working with data and general futzing around.
Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution
#164Earlier quoted context omitted.
Since you mention great CLI - is there a CLI tool that is free/cross platform that works like prettier ? I found https://csharpier.com/ but have never heard of anyone using it. Also not sure how it works with linters like roslynator or stylecop ? This is something I miss very much when coming back from TS, other languages also have better formatters. C# is very tied to editors/IDEs which is a nightmare in teams where…
dotnet format [0] exists and is maintained by the .NET team. It is different from Prettier in that it is much more configurable, but it gets the job done for us. It does integrate language services and can automatically apply code fixes for custom analyzers. I have not explicitly tried roslynator or stylecop, but I suspect this would work as expected. [0] https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-f..…
Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution
#165My favorite .NET 10 feature so far is not within the .NET library itself, but `dotnet tool exec` to run C# files as scripts without a build step. This has been available in F# for a long time via `dotnet fsi`, and for C# also via the third party cs-script tool. It took a surprisingly long time to officially reach the primary .NET language! I only really wish C# would’ve been directly integrated as an alternative scri…
I've wanted this for a long time. After reading this link, and the MS release announcement, I still don't understand what a "tool" is, or how you can use `tool exec` to run a single *.cs file. Is there a straight-forward recipe anywhere for doing this targeted at absolute simpletons?
Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution
#166Earlier quoted context omitted.
You can divide visual studio into 4 era's. The vs6 (we smashed all of our dev tooling together and its integrated decently) era, the vs2002/vs2003/vs2005 (we broke it all and you will like it and never speak of C++ again), vs2010 era (we fixed all of that from 2002 sorry about that), vs2017/vs2022 (it updates from the internet and takes forever to install and now does everything). The problem is MS is unwilling to st…
VS2017 was the introduction of the modern VS installer that is way faster than the prior ones.
https://learn.microsoft.com/en-us/cpp/porting/binary-compat-...
This saved so much time, space and support - where previously we had to recompile stuff, and if you had Maya/MotionBuilder/etc plugin it had to use the right compiler.
Also now even with newer IDE you can instruct the project to use older (or even better - a specific) version of the toolchain.
Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution
#167Earlier quoted context omitted.
I very much doubt about TS.Net, given the rewrite in Go decision. .NET nowadays has a serious adoption problem, and they should spend more time talking with their own colleagues at Azure, about their use of Java, Go, Rust.
I would not touch C# unless you are already using it. Microsoft proves over and over it cannot be trusted in what they say. Watch what they do: - basically dont use ant UI framework they say is the future and they are not using themselves - be vary of the future of some of it stuff like C#
Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution
#168Earlier quoted context omitted.
Do you know about any sizeable open source projects written in C#, other than what Microsoft has produced? I rarely come across anything written in it.
https://github.com/MonoGame/MonoGame (runs even on consoles, which is rare for open source game frameworks and engines) https://github.com/SubtitleEdit/subtitleedit https://github.com/jellyfin/jellyfin https://github.com/AvaloniaUI/Avalonia https://github.com/bitwarden/server https://github.com/unoplatform/uno https://github.com/files-community/Files https://github.com/NickeManarin/ScreenToGif https://github.com/DevT…
Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution
#169.NET was the most sane programming ecosystem that I worked in. Great CLI, great package manager, very good stdlib, strong IDEs/Debuggers, etc. but sadly interesting jobs like OSes, databases and compilers are way less common than in C++ world :(
Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution
#170Only thing I want to hear about lately is the next major version of Visual Studio, I feel like it will never come. I always feel like every major version has drastic improvements, and I'm starved for them.