Am running Ubuntu Budgie 20.04 and regularly run .Net apps (that I built) through CrossOver (20.0.4) / Wine. I just built a small WinForms utility in .Net 5.0 and tried to run it in CrossOver. A message box displayed with no text. I figured, OK, .Net 5.0 has not been installed in the bottle. However, it seems .Net 5.0 is not on the list of things to install.
Then I read that .Net 5.0 is designed to work everywhere (like .Net Core). So, I followed these instructions and installed dotnet on my Ubuntu.
When I type
dotnet --list-runtimes
I get
Microsoft.AspNetCore.App 5.0.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Then I try to run the app and I get
It was not possible to find any compatible framework version
The framework 'Microsoft.WindowsDesktop.App', version '5.0.0' was not found.
- No frameworks were found.
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.WindowsDesktop.App&framework_version=5.0.0&arch=x64&rid=ubuntu.20.04-x64
When I browse to that link, it redirects here: https://dotnet.microsoft.com/download/dotnet/5.0/runtime/?utm_source=getdotnetcore&utm_medium=referral and I see download .net for Windows or Linux. However, for Windows I can download for Desktop apps and for Linux only server apps.
When I look here: https://dotnet.microsoft.com/download/dotnet/6.0 it shows that the desktop framework is only available for Windows
I'm confused because the message dotnet is giving me implies the desktop framework is available for Ubuntu. However, the website makes it look like that is untrue.
Is there a way to install the desktop framework on Ubuntu or should I redo the utility in .Net 4.8 and run it through CrossOver?
You cannot run WPF and WinForms in linux https://github.com/dotnet/core/issues/4743