1

I have installed Mono 3 however when I run xsp or xsp4 it shows that I'm using .NET 4.0. I need to have .NET 4.5. Is it possible? Where can I configure it?

I've seen this page but I don't have any of those folders where I downloaded sources.

This is what it shows when I enter website by running xsp4:

Version Information: 3.2.7 (master/1eef047 C nov 28 18:16:30 EET 2013); ASP.NET Version: 4.0.30319.17020

How I installed Mono and XSP

Firstly I downloaded Lubuntu 13.10 32bit and launched it inside VirtualBox. Then did apt-get update and apt-get upgrade. After that rebooted the system.

Make sure all commands are executed as super user.

sudo -s

Got dependencies

apt-get install autoconf automake libtool g++ gettext libglib2.0-dev libpng12-dev libfontconfig1-dev mono-gmcs git

Downloaded sources of Mono and XSP

cd /opt
git clone git://github.com/mono/mono.git
git clone git://github.com/mono/xsp.git

Installed latest stable Mono from github

cd /opt/mono
./autogen.sh --prefix=/usr
make
make install

Installed latest stable XSP from github

cd /opt/xsp
./autogen.sh --prefix=/usr
make
make install

Tested that I have 4.0 running on XSP instead of 4.5

cd /home/pc/web
xsp4 # 4.0
xsp2 # 2.0
xsp  # 2.0

My configuration

/usr/bin/xsp4 looks like it should use 4.5. Just like this answer suggested. Also, I don't have xsp4.exe in my /usr/lib/mono/4.0/ only in /usr/lib/mono/4.5/ so I cannot copy anything like suggested in that answer.

#!/bin/sh
exec /usr/bin/mono $MONO_OPTIONS "/usr/lib/mono/4.5/xsp4.exe" "$@"
Community
  • 1
  • 1
Stan
  • 25,744
  • 53
  • 164
  • 242
  • to be able to answer your question, you need to tell us how did you install mono 3, how did you install xsp, and what Linux distribution and version you have – knocte Nov 28 '13 at 19:58
  • @knocte Okey, right now I'm doing everything from scratch because I broke something. Once I'm done I will tell exact steps I followed. – Stan Nov 28 '13 at 20:05
  • @knocte okey i've added step by step how i installed xsp and mono. – Stan Nov 28 '13 at 22:02
  • did you uninstall xsp and mono ubuntu packages before installing the new mono from github? – knocte Nov 28 '13 at 22:11
  • You don't have `/opt/mono/bin/xsp4`? That's what's being edited to make mono run 4.5 in the linked question. – bzlm Nov 28 '13 at 22:11
  • @bzlm he's installing in /usr, not /opt – knocte Nov 28 '13 at 22:11

1 Answers1

3

You say "I don't have any of those folders where I downloaded sources" referring to /opt/mono/bin/xsp4. But you're confusing things, and I know it because you shared how you installed mono.

/opt/mono should not be the place where you clone the mono repository to compile it. You should clone it somewhere else like your home folder. I.e.: /home/username/code/mono.

/opt/mono is where usually people install a custom version of mono. The way they do it is passing this path to the --prefix argument. But you're passing /usr as the prefix argument! So then you're installing it to a different location compared to the SO answer that you point out.

Also, it is not recommended that you do ALL those operations as a superuser. You normally compile code without root privileges, and you only need sudo for the install phase. So don't do "sudo -s" before everything. Just compile, and when you're done, do sudo make install. This will also make you have binaries that are not owned by root.

knocte
  • 16,941
  • 11
  • 79
  • 125
  • I just checked and you're correct. Similar things applies, just different paths. However it still does not work and configuration seems to be correct since it's pointing to xsp4 inside 4.5 directory. I've added configuration in my question. When I run it directly via `/usr/lib/mono/4.5/xsp4.exe` it still is 4.0 :( – Stan Nov 29 '13 at 08:23
  • I suggest that you post a new question since this one is too cluttered with installation and path details; we will be able to help easily in the new question – knocte Nov 29 '13 at 14:44
  • I don't think it's a configuration fault. XSP just can't run .NET 4.5 websites it seems. I've contacted several people and they all told me they just gave up on this matter. – Stan Dec 01 '13 at 11:00
  • I suggest that you post a new question – knocte Dec 01 '13 at 11:39
  • Okey, I've posted question as my final hope. http://stackoverflow.com/questions/20312489/can-xsp-run-asp-net-4-5 – Stan Dec 01 '13 at 13:14