However, the build/package system for this is still a complete mess if you want to target more than one architecture; I've spent much of the week looking at the question of how to make cross-platform assembly A depend on platform-specific assembly B, where B is one of B-win or B-mac, and it seems to require carefully hand building B into a nuget package.
I'm coming to appreciate msbuild, though. Or maybe that's Stockholm syndrome.
I think making it open source has come with a cultural change that's still propagating. It means not just defining the "Microsoft way" to do things but coping with myriad use cases turning up in the issue tracker.
Using XML as a general purpose programming language is also very ick.
It gives you the same IDE experience for your build scripts and your code including REPL for experiments and a debugger when needed.
since it is .NET Core they are as cross platform as your other code.
Actually it was already there in J++, and now we have Oracle trying to add back what Sun killed in 2000, with keeping 26 years of history running, it is ironic how some things turn around.
I think the big downside is that the industry still thinks of .NET as stuck in .NET 2.0 or something, from my casual browsing that .NET is a skill not C#. Regardless, I'm getting kind of excited for .NET 6 on official release, and doing the migration of all our apps off framework to the latest and getting some getting the new lang version.
If it is the former I can say that I never ever built on top of Sitecore or SharePoint. Recently only Asp.NET Core or whatever it is called now.
It’s a tarball. Unpack it wherever you like.
What exact problems did you have?
Edit: I’ve even “installed” the .NET SDK on ARM/Aarch64 devices this way. Zero issues.
Welcome to Linux?? Not to be sarcastic but if you want your hand held install Windows for your .Net development. It's pretty nice over there.
Maybe more like, "Welcome to MS tools on Linux?" There are no similar issues with installing a JDK, for example.
I think that’s a pretty far fetched complaint. There are tons of software out there on Linux which will break if you don’t satisfy their dependencies.
I’m sure the OpenJDK-tarball has some system-wide dependencies too (libssl?), but you can’t tell that because you probably installed it as root, using a package-manager instead.
If you do the same with the .NET SDK (use root, install via package-manager) you will find everything working equally smooth.
However, I often keep a collection of older versions and different patch levels in my home directory. These work fine for testing with the non-openjdk distributions for compatibility purposes.
I wasn't familiar with the icu library issue, so maybe it is something straightforward, but it seems odd that the fix was an env var. I certainly wouldn't say something like "welcome to linux" because of a scenario like this.
And they are obviously going to work because you’ve satisfied all the main OpenJDK dependencies through the install with your package-manager.
If you repeat your own scenario with the .NET SDK instead, you will have the exact same experience.
Its how I did it before the distribution packaged OpenJDK, which really wasn't that long ago.
The Ubuntu repos suggests there are more dependencies than just plain libc.
https://packages.ubuntu.com/hirsute/openjdk-11-jre
Could it be you have those dependencies satisfied through other things you’ve already installed?
> Do you have a reference to your claim that Java requires libssl?
None at all. It was an example of something I found it reasonable it might depend on, since .NET also depends on that on Linux :)
Since dotnet Core 3, you can use assembly trimming to remove unused assemblies. That results in a package of around 10MB for a Hello World app, or more like 40-70MB for large, real-world apps.
From dotnet 5 there is also member trimming, which will trim unused parts of assemblies, which will further reduce the size. I haven't used this yet, but Microsoft claim it can result in packages 5x smaller than with assembly trimming, e.g. only 2MB for a Hello World app.
There is also AOT compilation, but I wouldn't hold my breath on seeing that become production-ready any time soon (Microsoft have been hyping it and saying it's "coming soon" for 10 years or so).
I also have a Rust version of the project. 710 lines of Rust[0], 128 total dependencies in the tree, building in release mode with the MSVC Windows compiler. Final size of the binary is 2.29 MB, build time of 22.2[1] seconds.
Things are not great when your build times rival Rust's, and the output is slower and an order of magnitude bigger.
[0] Note that the C# version does have more robust handling when writing its output file than the Rust version, which adds couple dozen lines. Also the style conventions for brackets puts opening brackets on a new line for C#, the same line for Rust.
[1] Measured with hyperfine configured to run "dotnet clean -c Release" and "cargo clean" before each run.
But Rust is such a very different beast than dotnet, that I'm unconvinced it's a useful comparison; IMO a better comparison would be Golang.
Why would you exclude those in this comparison - they're already (guaranteed to be) installed on your windows targets?
How about linux/Mac targets?
I think 20-30MB is quite good - puts it in the ballbark of golang.
2MB+ for rust actually sounds a bit big -that's stripped?
> Why would you exclude those in this comparison - they're already (guaranteed to be) installed on your windows targets?
Note that this is a stand-alone build; it doesn't require the runtime to be installed. With that in mind, you're right they should be included, which would increase the build size by 8.3 MB.
> How about linux/Mac targets?
I can't build a Mac target because I don't have a Mac. I just built for a linux-x64 target in WSL, and the resulting binary is 35.0 MB. The Linux build looks like it's packaged the CLR into the main binary instead of keeping them separate, which would account for the greater size.
I did do a benchmark with hyperfine, which gave a 25.5 second build time. However, this is on WSL1 building off and on to an NTFS drive, which has known performance issues.
> I think 20-30MB is quite good - puts it in the ballbark of golang.
I've never used Go, but my understanding is that the Go compiler is very fast but doesn't do as much in the way of optimizations. If that's the case, having a larger and slower binary compared to Rust would be expected before you get to the packaged runtime.
The issue I'm taking here is that doing a trimmed dotnet build is (in this case) giving the same build time as Rust, but is only doing some AoT compilation and dead-code elimination. Rust is already doing that in addition to a whole host of other optimizations.
From a user perspective, this feels like dotnet is giving me a worse end product for the same time taken. Especially given the Rust version wasn't harder to write than the C# version (in fact, due to bad documentation the C# version was harder).
> 2MB+ for rust actually sounds a bit big -that's stripped?
No, that is not stripped, and with the standard release profile.
Just took a look at my current project, which has several components: an ASP.NET web UI is 80MB, an ASP.NET API is 65MB, and backend services range from 40-55MB (these are all pretty complex, production-grade components).
I chiefly like asdf because I typically need at least two toolchains (with various versions for various projects) - eg ruby and nodejs, or python and nodejs.
> I think most people don't know or think C#/.NET are capable of this
Take all of this amazing stuff and it also works on embedded/raspi4... I have been playing around with using C#8 to directly drive & sample GPIO. Who needs timer ICs when you have a busywait while loop checking the high res timer...
Also, don't forget that you can go open an issue or submit a PR to any of the major .NET repositories right now, and expect to have your work (assuming accepted) incorporated into an official .NET release within a year or so.
And tooling, etc. Check out visual studio 2022. Its available in preview now.
Yes! They also publish videos of their design review discussions - I submitted a cryptography-related PR a while back, and it was really cool to watch my proposal being discussed, and then even cooler when my code made it into dotnet :)
> And tooling, etc. Check out visual studio 2022
Don't forget JetBrains Rider - I switched from VS a few years ago, and haven't looked back. VS is great too, but in terms of performance and stability, Rider kicks it to the curb (IMO).
A lot of people are concerned about power usage these days, particularly if these things are running off a solar cell.
And these days, most embedded controllers include some kind of timer anyway. Micropython has a timer interface that interrupts into a python subroutine. I use this for application level routines interfacing with a hardware watchdog.
If you're running off a battery say, then it's better to build your software from the start to optimize for the various sleep modes.
https://lastminuteengineers.com/esp32-sleep-modes-power-cons...
Scott Hanselman has a couple of guides on his blog on how to get it up and running.
The on-by-default telemetry and license restrictions come to mind
https://github.com/VSCodium/vscodium
It is a repository of scripts to automatically build Microsoft's 'vscode' repository into freely-licensed binaries with a community-driven default configuration.
I didn’t know this until recently when someone pointed it out.
https://github.com/dotnet/core/issues/505
Thought it was relevant since OP is talking about a Linux IDE for C#
Have been writing C# to interact with C/C++ and publishing C ABIs as static/shared libs that are natively compiled
My mind has been absolutely blown with what modern .NET and C# are capable of doing in terms of low level/systems program and interop with C/C++/Rust etc.
The performance and object sizes are killer too.
I think most people don't know or think C#/.NET are capable of this
Can envision a not so distant future where C# is a common choice for places when you'd typically reach for C++
Also, the folks on the .NET Interop team are all super friendly and willing to have a conversation with you or answer questions. My experiences with the whole .NET organization at MS as a random person has been nothing short of shockingly pleasant.