.NET Framework 4.5 and Visual Studio for Mac 8.10.2

Tomasz Olszewski 1 Reputation point
2021-06-21T07:36:30.81+00:00

Hello,
I'm green when it comes to .NET and it's my day zero but I read somewhere that I won't run a snake application using the .NET framework on a Mac? Apparently, only .NET Core works and I would need either to install Windows on a Mac or Windows virtualization, e.g. via VirtualBox. Is it true?

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,560 questions
{count} votes

2 answers

Sort by: Most helpful
  1. JiayaoZhu 3,911 Reputation points
    2021-06-22T03:12:24.397+00:00

    Hi,

    Thanks for posting on our forum!

    Yes, compiled applications that target the .NET framework will absolutely not run on MacOS, or Linux, or Solaris or..... anything not Windows. .NET core is now portable to MacOS though. In this case, you can have three options to install and run your .NET-based Apps on your MacOS:

    1) Use Visual studio environment
    2) Update your codebase to .Net Core and then use .Net Core
    3) Install and use a thick virtual machine that runs a full copy of Windows. This has the obvious downsides of being much more expensive (both in terms of the system resources it will need, and the software licensing costs), and you end up using Windows anyway (so you might as well just RDP to a real Windows machine).

    Here is an article which includes more information on these options:

    https://stackoverflow.com/questions/31864724/can-you-install-and-run-apps-built-on-the-net-framework-on-a-mac

    (Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.)

    However, because this article is kind of out-of-date, I've got some update of this article:

    1. After our research, installing Mono Project runtime does not always work. This tool does not support the full .NET Framework, and likely requires some non-trivial modifications to the code to make it work. If you go this route, you're either going to be limited to the areas of the Framework that are supported by Mono, or you'll have to maintain 2 different versions of the same code base. Neither option sounds very good to you.
    2. You should take serious care of the version of your MacOS and its correspondingly suitable .NET Core version. Here is an article which you can refer to:

    https://learn.microsoft.com/en-us/dotnet/core/install/macos

    Besides, in this article, I notice that your MacOS version 8.10.2 is not mentioned, so I am not sure if your version supports .Net Core. Although I do find a latest version of Visual studio for your Mac version, I still suggest you to consider twice before using it. Because if your Mac version is too old for .Net Framework 4, even you can successfully install Visual studio and use VS for your apps using .Net Framework, you may encounter issues in the future. In our world, we always suggest our clients to use appropriate OS version for appropriate services, neither too new nor too old. Here is the link for installing 2019 Visual Studio:

    https://learn.microsoft.com/en-us/visualstudio/releasenotes/vs2019-mac-relnotes#8102

    Finally, if you are interested in building Cross-Platform .NET Core Apps by yourself, this is the article that you can refer to:

    https://stackify.com/cross-platform-net-core-apps/

    (Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.)

    Thanks for your support!

    BR,
    Joan


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Loi Tran 0 Reputation points
    2023-05-27T19:19:24.5+00:00

    I want to say that .NET Framework cannot run on MacOS.

    However, I can install a ".NET Framework" application using Rider and it run it.

    Someone, please explain what's going on here and/or what I'm misunderstanding.

    A screen shot of initializing .NET Framework app on MacOS

    I differentiate the .NET framework vs .NET core apps here in the screenshot because we clearly see that the application we can initialize falls under the ".NET framework" and NOT the ".NET core" section.

    This leads me to think that MacOS can run it, despite the documentation and many sources saying that MacOS cannot.

    Someone from Microsoft or Rider please provide a more thorough explanation for myself and others for future reference.

    Thanks so much!