Are there any ways to work with .NET framework 4.6.2 on Ubuntu

152 views Asked by At

I'm having some projects that have target of .NET framework 4.6.2.

Now I want switching my desktop's OS to Ubuntu. So are there any way to work with my projects on ubuntu from coding to debug, release,...About my project target framework

2

There are 2 answers

0
Richard On

No.

.NET Framework is Windows only.

You might be able to get something working with WINE, but you will have another source of errors to cope with.

If you want cross platform you're going to need to port from Framework to Core.

0
TimothyP On

It depends what kind of project you are working on.
If it is a Console or Windows Forms project, you can simply install Mono:

sudo apt-get install mono-complete

Compile apps using gmcs, for example gmcs Program.cs
Run app using mono, for example mono Program.exe

This is basically the open source version of the .NET Framework.

If your project is a WPF project, you could take a look at AvaloniaUI .
But in that case you will have to convert your project to .NET6/7/8

And of course you'll probably want a good IDE like Visual Studio Code