35
submitted 1 week ago* (last edited 1 week ago) by bridgeenjoyer@sh.itjust.works to c/programming@programming.dev

Mono appears to be dead. I enjoy making life hard so I dont use windows. I am trying to learn very simple c# but am having trouble gettung visual studio to run anything on linux (debian/mint). It wont even run with dotnet in the terminal either. I dont really like all the features in vs either, i just want simple.

For reference im learning with the yellow book by rob miles. I want to learn the old way, not using a bunch of shiny helping tools (i never feel i really learn with those and it stunts my growth).

top 37 comments
sorted by: hot top controversial new old
[-] mesamunefire@piefed.social 2 points 6 days ago

Oh no! What happened to mono?

[-] bridgeenjoyer@sh.itjust.works 1 points 6 days ago

I think they just stopped updating it. So im sure its still usable just unsupported

[-] mesamunefire@piefed.social 2 points 6 days ago

whats the replacement on linux? Did they just make dotnet work with linux natively?

[-] zap12344@feddit.it 19 points 1 week ago* (last edited 1 week ago)

Jetbrains Rider free for personal use. You must use .net (core) on Linux, it works like a charm. Visual studio code is fine too but you need tons of plugins to have an IDE experience in .Net. You might have a problem with your .net installation id you can’t compile a simple program. How did you install .net? From microsoft’s ppa?

[-] marlowe221@lemmy.world 3 points 1 week ago

Only like 3 plugins are necessary on VSCode for C#/.NET. I use it every day at work. I use just as many plugins, if not more when I write JS/TS.

I’ve heard Rider is a good experience but I’ve never tried it.

What I really want is better support for the language in Neovim plugins….

[-] DeLift@feddit.nl 2 points 1 week ago

For what it's worth, Rider has an excellent vim emulator plugin.

[-] bridgeenjoyer@sh.itjust.works 2 points 1 week ago

Yes, from the ms walk through which was actually decently written. I just think vs is too confusing for me right now, I only want to learn simple code first before building a project

[-] zap12344@feddit.it 6 points 1 week ago

You don’t need to use vscode, any text editor is fine. Try to follow the getting started tutorial on microsoft’s website to see if your dotnet configuration is correctly installed. https://learn.microsoft.com/en-us/dotnet/core/get-started

[-] Zubgub 3 points 1 week ago

To clarify things. Visual Studio and Visual Studio Code are two different things. Visual Studio is a full blown IDE intended to be run on Windows. Visual Studio Code is a glorified text editor out of the box that has plugins that help with coding in other languages like C#. On Linux you will want VS Code.

[-] Freigeist@lemmy.world 14 points 1 week ago

.NET/C# is fully platform agnostic and Linux is a great host system for development in C#. In fact a lot of software developed in C# (basically all of the cloud software) is hosted on Linux systems. As others pointed out Rider and VS Code are a very good choice on Linux.

[-] djcas9@feed.djcas9.com 0 points 5 days ago
[-] Freigeist@lemmy.world 2 points 5 days ago

Hahaha, sounds a lot like a answer from an LLM admittedly, guess it starts affecting my writing 😂

[-] dihutenosa@piefed.social 11 points 1 week ago

VS Code runs flawlessly on Linux, as does dotnet the compiler/runtime.
C# is a fine language, and you can easily upgrade to F#, if adventurous.
I use nvim with omnisharp-roslyn myself, which doesn't work as reliably, but I'm used to Vim, so meh.

[-] Jestzer@lemmy.world 8 points 1 week ago

If you want simple: Visual Studio Code. If you want fancy: Rider. That being said, Rider, I find, tends to work better out of the box.

[-] MagicShel@lemmy.zip 4 points 1 week ago

VSCode probably? I use Mint myself, but I don't do C#. I know IntelliJ, VSCode, and Eclipse all work fine, I just don't know what's best for C#. I'm surprised Visual Studio doesn't work.

[-] jcarr@programming.dev 4 points 1 week ago

Depending on your distro, you may have the .NET SDK in your packages already. Debian doesn't have it. I'm not sure about Mint. I use Ubuntu MATE and .NET 8 is available. Check with this:

apt search dotnet-sdk

If you see something like dotnet-sdk-8.0 in the list, this will install everything you need:

sudo apt install dotnet-sdk-8.0

If it's not available in the package repo, it's not difficult to install manually. Follow the instructions here: https://learn.microsoft.com/en-us/dotnet/core/install/linux?WT.mc_id=dotnet-35129-website#manual-installation

For my development environment, I use VS Code with the following extensions:

  • C# Dev Kit (Microsoft) -- This provides the full development experience: intellisense, debugger, project management, etc.
  • C# Extensions (JosKreativ) -- This provides handy helpers for scaffolding classes and other module types.
  • Todo Tree (Gruntfuggly) -- Locates TODO comments in your code and displays them in a dedicated tree view.

Once you've installed the SDK along with VS Code and the associated extensions, getting started is as easy as:

dotnet new console -o HelloWorld
cd HelloWorld
code .
[-] jcarr@programming.dev 2 points 1 week ago

Clarification for Debian!

I recently installed on Debian 13 as well and these are the instructions I followed: https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian?tabs=dotnet8

The instructions say Debian 12, but they do work on Debian 13, FWIW.

[-] PhilipTheBucket@piefed.social 3 points 1 week ago

I really would not recommend specializing in C# at this point in computing history. You can do what you want obviously, but Python is much more likely to be what you want. C++ or Java might be okay if you want a job and are okay with a little bit dated / not ideal languages, or you could learn one of the proliferation of niche backend Linuxy languages, but C# has most of the drawbacks of C++ and Java without having even their relative level of popularity.

IDK what issue you're having with VSCode, but I think installing the .NET SDK and then using dotnet by hand from the command line, to test the install, might be a good precursor to getting it working in VSCode. But IDK why you would endeavor to do this in the first place.

[-] darkmarx@lemmy.world 18 points 1 week ago

What are you talking about? C# is massively popular, especially with corporations and government. If someone wants to get a job writing software, they won't go wrong learning C#.

Python is great for data evaluations and scripting. There's nothing wrong with learning it, or any other language for that matter... including Java, C, or C++

[-] PhilipTheBucket@piefed.social 2 points 1 week ago

C# represents about 12% of the jobs out there.

https://www.devjobsscanner.com/blog/top-8-most-demanded-programming-languages/

It's not unpopular, but it's definitely not "massively" popular anymore. Different languages have different strengths and weaknesses, but C# has a few more weaknesses than most. In my opinion. Yes, there's nothing wrong with learning any particular language you want to learn (and I'm a little surprised to see C++ has fallen significantly lower than C#, sure, fair enough). I'm just struggling to see an upside for learning it in the modern day (and now knowing more about what this person's goal is I feel even more strongly that C# is the wrong answer for them. In my opinion.)

[-] ChairmanMeow@programming.dev 4 points 1 week ago

It's literally the 4th most popular language on the list. And JS/TS is obviously number one due to it being used in frontend as the de facto standard. So when looking at languages used for backend systems, it's number 3.

I have no idea what you're referring to when you say C# has more weaknesses than most. C# is incredibly solid these days, typed, easy to write and with great support for web apis (or anything really).

[-] bridgeenjoyer@sh.itjust.works 2 points 1 week ago

I was going to try python, but I'd eventually like to learn unity as well so i decided on c#. Plus I felt python was too new and would skip a lot of core programming skills id just like to know. Im not super interested in doing it the new way with all the helpers, or I wont feel like I learned anything. I wanted to learn 20 years ago but never got into it, so I just feel like starting at the very bottom. Makes no sense I know.

I do have the .net sdk and it seems to try to compile a simple program, it just throws errors even on an example program that shouldn't have any. Im sure its something dumb.

[-] atzanteol@sh.itjust.works 8 points 1 week ago

Plus I felt python was too new and would skip a lot of core programming skills id just like to know

Python was first released in the '90s. It's older than C#.

That said I consider Python to be a garbage language. "Easy" to use for trivial things, a pain in the ass if you have more than 500 lines of code. The lack of strict typing makes even the most trivial of refactoring an all day task.

[-] PhilipTheBucket@piefed.social 3 points 1 week ago

You can do strict typing in python if you want it, it's very highly recommended if you're doing a big project.

[-] atzanteol@sh.itjust.works 3 points 1 week ago

Kinda.... You mean mypy? I'm using that and the experience is not great... It's okay for your own code but a ton of libraries are just 🤷 about types. Especially return types which is infuriating. What do you get from that call? Who TF knows - go read stack overflow and hope there's an example giving you some info.

[-] PhilipTheBucket@piefed.social 0 points 1 week ago

IDK, I just have never really had this become a serious issue for me. I get what you mean, some actions are a little bit of a pain in the neck because people are often sloppy about typing, but literally the only time I can remember it being an issue at all has been when numpy is involved and so I have to figure out if something is a native Python thing or a numpy-fied custom structure.

I mean there's just not that many types. Generally something is a list, a number, a map, or a string, and it's pretty obvious which. Maybe there are OOP domain things where a lot of variables are objects of some kind of class (sort of more of a C++ type of program structure), and so it starts to become really critical to have strong type tools, I'm just saying I haven't really encountered too much trouble with it. I'm not saying it's imaginary, you may be right in your experience, I'm just saying I've worked on projects way bigger than a few hundred lines and never really had too much of an issue with it in practice in my experience.

[-] atzanteol@sh.itjust.works 2 points 1 week ago

Maybe there are OOP domain things where a lot of variables are objects of some kind of class (sort of more of a C++ type of program structure),

Complex data structures are not "more of a C++ type of program structure". And if you're using dict for complex datatypes I weep for your source code. Even C has a struct for representing records of data.

[-] PhilipTheBucket@piefed.social 1 points 1 week ago

Complex data structures are not "more of a C++ type of program structure".

Oh, they are not at all. Equating complex data structures with user-defined data structures (in the form of classes and fields and whatnot), and using the latter as the primary method of storing and working with data (so that you're constantly having to bring into your mental scope a bunch of different classes and how they need to interact), is 100% a C++ type of program structure. It's pretty unusual in my experience in Python. Or, I mean, it's perfectly common, but it's not primary in the same universal way that it is in C++ and derivatives. It gets to exist as its own useful thing without being the only way. That's what I am trying to say.

[-] atzanteol@sh.itjust.works 2 points 1 week ago

Equating complex data structures with user-defined data structures (in the form of classes and fields and whatnot), and using the latter as the primary method of storing and working with data (so that you’re constantly having to bring into your mental scope a bunch of different classes and how they need to interact), is 100% a C++ type of program structure.

What does that even mean?

struct User {
    active: bool,
    username: String,
    email: String,
    sign_in_count: u64,
}

How do you define that in Python? Just a dict[str, Any]?

[-] PhilipTheBucket@piefed.social 1 points 1 week ago

You define it in exactly the same way you just did. Completely fine, you have to do it for lots of things. It's nice that Python can do that too.

Now, I'll grab a random snippet of code from some random file from my source dir:

        existing_bookmarks = db.session.execute(
            text('SELECT post_reply_id FROM "post_reply_bookmark" WHERE user_id = :user_id'),
            {"user_id": user_id}).scalars()
        reply = PostReply.query.filter(PostReply.id.in_(existing_bookmarks), PostReply.deleted == False).first()
        if reply:
            data = {"comment_id": reply.id, "save": True}
            with pytest.raises(Exception) as ex:
                put_reply_save(auth, data)
            assert str(ex.value) == 'This comment has already been bookmarked.'

You can see some classes in use, which again is fine. But you also see inline instantiation of some reply JSON, a database returning a list of post_reply_id values without needing a special interface definition for returning multiple values, lots and lots of cognitive and computational load per line of code that's being saved because the language features are saving people the heavy lifting of depending on user-defined classes for everything. It means you don't have as many adventures through the code where you're trying to modify a user-defined interface class, you don't need as much strong typing, that kind of thing.

I would bet heavily that a lot of the things that are happening in that short little space of code, would need specific classes to get them done if the same project were getting implemented in some C++-derived language. Maybe not, I just grabbed a random segment of code instead of trying especially hard to find my perfect example to prove my point.

It is fine, there are significant weaknesses to Python too, I'm not trying to say "yay python it's better for everything," anything like that. I'm just saying that if you don't get familiar with at least some language that does things more that way, and instead get solely accustomed to just user-defined classes or templates for every information exchange or functional definition, then you'll be missing out on a good paradigm for thinking about programming. That's all.

[-] atzanteol@sh.itjust.works 2 points 1 week ago

FWIW Here's similar go code (converted by a llm).

func TestReplyAlreadyBookmarked(t *testing.T) {
    var reply PostReply
    err := db.Raw(`
        SELECT pr.* FROM post_replies pr 
        WHERE pr.id IN (
            SELECT post_reply_id FROM post_reply_bookmark WHERE user_id = ?
        ) AND pr.deleted = false 
        LIMIT 1
    `, userID).First(&reply).Error
    
    if err == nil {
        err := putReplySave(auth, map[string]interface{}{
            "comment_id": reply.ID,
            "save":       true,
        })
        
        assert.Error(t, err)
        assert.Equal(t, "This comment has already been bookmarked.", err.Error())
    }
}

You can create in-line data structures AND be a properly typed language.

[-] atzanteol@sh.itjust.works 1 points 1 week ago

You define it in exactly the same way you just did. Completely fine, you have to do it for lots of things. It’s nice that Python can do that too.

"It's nice that Python can do that too."

Ugh.

Never argue with a pythonista.

[-] PhilipTheBucket@piefed.social 1 points 1 week ago

Dude you were the one that asked the fucking question lol

[-] atzanteol@sh.itjust.works 1 points 1 week ago

And have regretted it.

[-] PhilipTheBucket@piefed.social 6 points 1 week ago

Plus I felt python was too new and would skip a lot of core programming skills id just like to know. Im not super interested in doing it the new way with all the helpers, or I wont feel like I learned anything.

Okay, you definitely want to learn C then. C# and C++ both add a ton of helpers. C# has a massive runtime environment that's opaque and a little bit weird, and C++ has a massive compile-time environment that's opaque and very weird. It's sort of pick your poison. If you learn C and get skilled with it, you'll be well set up for understanding what is actually going on and having strong fundamentals that will set you up well for whatever higher-level language you want to learn in the future.

Put another way: C# will hide just as many of the fundamentals and hardcore details from you as python will, it'll just do it in a weird and counterintuitive fashion that will make it more confusing and with more weird C#-specific details.

I'd eventually like to learn unity as well so i decided on c#

I would actually just cut out the middleman and start with the Unity editor then. It actually might be a really good introduction to the nature of programming in general without throwing a bunch of extra nonsense at you, and in a really motivating format.

I do have the .net sdk and it seems to try to compile a simple program, it just throws errors even on an example program that shouldn't have any. Im sure its something dumb.

What's the program and what's the error? I'm happy to help if something jumps out at me. I'm voicing my opinion otherwise on what might be better ways to attack this all in general, but I'm sure me or people here can help sort out the issues if you really want to take this approach and you're just getting stuck on something simple.

[-] GojuRyu@lemmy.world 1 points 1 week ago

I second going straight to unity in this case. I startet my programming journey with unity tutorials and my own hobby projects. This gave me a good grasp of many of the fundamentals when I started learning programming at university. It wasn’t comprehensive but it was way more effective than any attempt I had before then due to the motivation and great tutorials available in that space.

[-] xia@lemmy.sdf.org 2 points 1 week ago

https://consulo.io/ (Basically a liberated jetbrains intellij/rider thing)

this post was submitted on 15 Aug 2025
35 points (100.0% liked)

Programming

22314 readers
20 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS