Visual Studio for Mac to run .Net Framework 4.6.1 using Mono - Unable to select Mono version

188 Views Asked by At

I have been trying to run a project with target .Net framework 4.6.1 on Visual Studio for Mac 2019. Project is building successfully but giving runtime error

Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.

The same project is running without any errors on a Windows machine.

I installed Mono 4.6.1 from here.
I can see two versions of monos in the folder Library/Frameworks/Mono.framework/Versions/4.6.1 & Library/Frameworks/Mono.framework/Versions/6.12.0 (latest version).

However I'm not able to select the 4.6.1 version in the Visual Studio Preferences -> Projects -> .Net Runtimes. I'm getting an error

Mono run time not found Please provide a valid directory prefix where mono is installed (for example, /usr)

How can I check if the older version is running or installed correctly and switch Visual Studio .Net Runtimes to Mono 4.6.1?

0

There are 0 best solutions below