Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can XSP run ASP.NET 4.5?

Tags:

c#

asp.net

mono

xsp

I've been trying to launch MVC5 (depends on .NET 4.5) under Mono for days now and with no success.

Configuration

  • Clean install of latest Lubuntu
  • No previous XSP/Mono
  • Compile and install XSP/Mono from latest git sources
  • Mono version: 3.2.7

Problem

When I run xsp4 on any folder it shows Version Information: 3.2.7 (master/1eef047 C nov 28 18:16:30 EET 2013); ASP.NET Version: 4.0.30319.17020.


Latest Mono version supports .NET 4.5, does XSP?
If so, how can I make sure that it is using 4.5 instead of 4.0?

Even if I run XSP directly from Mono 4.5 folder (/usr/lib/mono/4.5/xsp4.exe) it shows ASP.NET version is 4.0.

Also, XSP config line in /usr/bin/xsp4 looks like so. I'm very confused.

#!/bin/sh
exec /usr/bin/mono $MONO_OPTIONS "/usr/lib/mono/4.5/xsp4.exe" "$@"
like image 466
Stan Avatar asked Nov 02 '22 09:11

Stan


1 Answers

You can instruct mono to launch a particular runtime version with the --runtime flag. In this case, it would be this way:

#!/bin/sh
exec /usr/bin/mono $MONO_OPTIONS --runtime=v4.5 "/usr/lib/mono/4.5/xsp4.exe" "$@"

However, as far as I understand, the 4.5 profile of .NET doesn't include changes in the runtime, but in the class libraries and compilers. So if the above doesn't work, it simply means that the version of the runtime that one needs to use to run a 4.5 application is simply the 4.0.30319 version.

The best way to understand this is to include this little image diagram grabbed from a Scott Hanselman's blog post:

enter image description here

like image 141
knocte Avatar answered Nov 09 '22 04:11

knocte