Old version of .Net not installed with latest mon?

I was working on a .NET 3.5 C # project using Visual Studio Community 2015, but I was always going to do most of the Linux development (Ubuntu Gnome 15.04) using Mono and MonoDevelop.

I am running the latest stable version of Mono (4.0.4) and MonoDevelop (5.9.6), which supports .NET 4.5 and can open the VS solution file without problems.

Now I have been writing C ++ applications on Linux for most of the decade, but C # and .NET are completely new to me. Therefore, I assumed that if I installed the Mono version that supports .NET 4.5, I would also get .NET 3.5, because the later version is a superset of the older one - just like the C ++ 14 compiler supports C ++ 03.

However, this does not seem to be the case, since the state is MonoDevelop (within the Target Framework parameter for each project):

  • .NET Framework 4.5.1
  • Mono / .NET 4.5
  • Mono / .NET 3.5 (not installed)

So do I have to install a parallel older version of Mono to get support for .NET 3.5, or am I just suffering from a configuration problem?

+6
source share
3 answers

Lacking a configuration problem, Mono refused to support older frameworks in version 4.x. If you need to compile for build 3.5, then yes, you will need a parallel installation.

Dropped support for old frameworks

Reference Assemblies

We no longer compile link assemblies for .NET 2.0, .NET 3.5 or API.NET 4.0, now we send binaries of referenced assemblies (API contracts, without any real executable code in them).

Mono will now build .NET 4.5 assemblies as well as mobile profiles.

Note. You can still run assemblies compiled for earlier .NET profiles on Mono, there is no need to recompile them (they just run on .NET 4.5).

+5
source

I had a similar problem (a project targeted at .NET 4.0, but now only 4.5 is available via mono ). My workaround was to create a symbolic link for 4.0:

On my Fedora 32 computer, this was done

 cd /usr/lib/mono sudo ln -s 4.5 4.0 

This should work because there are ( almost ) no changes between .NET 4 and 4.5 - YMMV

+3
source

Finally, it worked. I am using Visual Studio for Mac - https://www.visualstudio.com/vs/visual-studio-mac/

In the section "Settings" → "Projects" → "Network Runtimes" you can change the default runtime .Net. The default is Mono 4.8.0.

This is here on mac: /Library/Frameworks/Mono.framework/Versions/4.8.0

Here you can download older versions of Mono https://download.mono-project.com/archive/

Downloaded 3.12.1 from https://download.mono-project.com/archive/3.12.1/macos-10-x86/ and copied it to the /Library/Frameworks/Mono.framework/Versions/ folder.

In VisualStudio, you can add the .net framework and set it as the default. My project is then compiled.

+2
source

All Articles