I needed to be on Windows for work though and, sadly, often still do, so the association is strong.
The thing is, now most things I do target some flavour of Linux - and although I could write C# and target Linux with absolutely no problem - there are a lot of other options that C# has to complete with. Granted those options would also, at least in theory, have been viable options on Windows but it definitely would have felt a bit like paddling against the flow to host Ruby on Rails or Python or whatever on Windows.
And if I want to target command line or desktop with something cross-platform I'm going to compile to a native binary that requires minimal dependencies, so Rust feels like a more natural fit than C#, especially with Microsoft's desktop UI story being such a dog's breakfast (and even more-so when you account for cross-platform).
Again, in a commercial environment, I could imagine using Electron for that sort of thing because that's what most companies do (but because everything I do nowadays is backend, web, or systems integration, I haven't written a desktop app in a commercial context in 13 years, and I haven't written a command line app in that context since just before the pandemic). However, for my own projects I want to hew as closely as possible to my own principles and ideals and, for them, it'll be a cold day in hell before I ship a desktop or command line app that needs some giant runtime like Electron as a dependency.
Again, the point is that C#, whilst in many ways a great language, doesn't come out as the frontrunner.
I needed to be on Windows for work though and, sadly, often still do, so the association is strong.
The thing is, now most things I do target some flavour of Linux - and although I could write C# and target Linux with absolutely no problem - there are a lot of other options that C# has to complete with. Granted those options would also, at least in theory, have been viable options on Windows but it definitely would have felt a bit like paddling against the flow to host Ruby on Rails or Python or whatever on Windows.
And if I want to target command line or desktop with something cross-platform I'm going to compile to a native binary that requires minimal dependencies, so Rust feels like a more natural fit than C#, especially with Microsoft's desktop UI story being such a dog's breakfast (and even more-so when you account for cross-platform).
Again, in a commercial environment, I could imagine using Electron for that sort of thing because that's what most companies do (but because everything I do nowadays is backend, web, or systems integration, I haven't written a desktop app in a commercial context in 13 years, and I haven't written a command line app in that context since just before the pandemic). However, for my own projects I want to hew as closely as possible to my own principles and ideals and, for them, it'll be a cold day in hell before I ship a desktop or command line app that needs some giant runtime like Electron as a dependency.
Again, the point is that C#, whilst in many ways a great language, doesn't come out as the frontrunner.