How do I install .NET?

Hello, first I'll say that I am new to linux, and this is my first use of discord aswell so please be patient if I have no idea what your talking about. I've tried a few times now to install .NET now for VScode and Unity, but I can't seem to get them to recognize where it is. Currently I have deleted everything except for a zip file of .Net. If someone could tell me how to fix this issue or walk me through the steps that would be great! A freind told me this is a good responsive community and I hope to see that is true. Once again I have no Idea what I'm doing so more depth is probably required with me so I apologize for the hassle. P.S. I don’t know the difference between 8.0 and 9.0, that would be helpful aswell.
17 Replies
mskiptr
mskiptr2w ago
Do you just want to run some existing .NET programs or develop your own .NET software instead?
EDslayer
EDslayerOP2w ago
I want to develop software.
mskiptr
mskiptr2w ago
Alright, then you will need the tooling properly set up. First of all, there are a couple of ways to install stuff on Linux. It is possible to just download an executable and run it, but that's not the best option usually. How much do you know about package managers? Maybe you've heard of Homebrew before
Homebrew
Homebrew
The Missing Package Manager for macOS (or Linux).
mskiptr
mskiptr2w ago
Also, do you know what the PATH environment variable is? (Now I feel like such an introduction might scare others off… So for anyone who wants to just use Bazzite, and not create software on their own: you do not need all of those details.)
EDslayer
EDslayerOP2w ago
I do not know what a package manager is, but PATH is where they can know where .NET is installed.
mskiptr
mskiptr2w ago
Okay. So when you install software on Windows, you usually run an installer. Sometimes it's an .msi file, sometimes and .exe but it's typically just a small program that extracts all the necessary stuff to "Program Files", creates desktop and start menu icons, maybe sets some registry keys and so on. On Linux that is also possible, but it is generally avoided. These installers, while usually pretty good at installing stuff, way too often lack in the uninstalling stuff departament. Instead, most Linux-based OSes use package managers. Those are essentially programs to install other programs. They know where to download things from, how to set it all up and then remember which files were created because of which program. They can even keep track of which programs require which libraries, so that common libraries don't have to be installed over and over again for each program that needs them.
Azema Viator
Azema Viator2w ago
.net also has a script install that can inject it into your home dir
mskiptr
mskiptr2w ago
Bazzite goes a step further and locks the core system components. The OS, while still formed out of individual Fedora packages, is much harder to break because you won't accidentally uninstall any essential parts of the system. But that also means you don't really want to install your own software system-wide.
Azema Viator
Azema Viator2w ago
You will likely be best off with using a distrobox container and installing what you need in there instead.
mskiptr
mskiptr2w ago
Instead you can either ignore package management (and just use the install script), or use a package manager specifically designed for per-user programs (like Homebrew), or use containers to keep the .NET stuff isolated from everything else.
EDslayer
EDslayerOP2w ago
Should I use Homebrew? What would you recommend? Also what is distrobox?
mskiptr
mskiptr2w ago
Distrobox is a tool to easily create containers and interact with stuff running inside those. Each container usually has a whole separate operating system installed inside. That lets you use programs from Ubuntu or whatever when your actual OS is Bazzite. It also makes cleaning things up super easy. Containers are kinda like virtual machines. But since they aren't as isolated from the rest of your computer, they can be faster / more lightweight and seamlessly integrated into everything else on your computer.
EDslayer
EDslayerOP2w ago
Could that be used for non-linux OS's?
mskiptr
mskiptr2w ago
Like you can have a graphical program running inside a container and its window can be directly shown on your desktop. (Instead of getting a window with another desktop shown inside.) Not really. Containers work by isolating a bunch of Linux programs but they still need the kernel (hardware drivers, schedulers, etc.) to be compatible with those programs. If you want to e.g. run an entire instance of Windows on top of Bazzite, you can use a virtual machine for that. Or use an app like Bottles to "contain" a single Windows program instead. (I guess one could argue Proton / Wine are Windows containers for Linux.) So yeah. To get back to the original topic, here's a guide on using Distrobox: https://docs.bazzite.gg/Installing_and_Managing_Software/Distrobox/ First try making an Ubuntu container, start a command line shell inside it and run the .NET installer script there. Here is the official Microsoft documentation on the last part: https://learn.microsoft.com/en-us/dotnet/core/install/linux
EDslayer
EDslayerOP2w ago
So I got it installed with homebrew, and VScode recognizes it, but nit the c# and Unity extension.
mskiptr
mskiptr2w ago
Do you get any error messages or something? Also, does running dotnet --list-sdks and dotnet --list-runtimes in a terminal work correctly? And is it the same both in the VScode terminal and in the standalone terminal emulator app?
Shrimplover100
I would recommend looking up the system requirements of unity and vscode and see what version they recommend if you still don't know which version. Also is unity and c# installed within homebrew or outside? I'm not that familiar with homebrew but something tells me it could be a dependency issue with those plugins so check to see if they are in homebrew or not with unity. If anyone else smarter than me wants to correct me feel free. I don't know if anything from this will help but I hope that this reference will provide something of value: https://discussions.unity.com/t/solved-unity-with-vs-code-and-intellisense-on-linux-mint/812223 Hope I was of help - The friend

Did you find this page helpful?