XSP 可以运行 ASP.NET 4.5 吗? [英] Can XSP run ASP.NET 4.5?

查看:17
本文介绍了XSP 可以运行 ASP.NET 4.5 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我几天来一直在尝试在 Mono 下启动 MVC5(取决于 .NET 4.5),但没有成功.

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

  • 干净安装最新的 Lubuntu
  • 没有以前的 XSP/Mono
  • 从最新的 git 源编译和安装 XSP/Mono
  • 单声道版:3.2.7

当我在任何文件夹上运行 xsp4 时,它会显示 Version Information: 3.2.7 (master/1eef047 C nov 28 18:16:30 EET 2013);ASP.NET 版本:4.0.30319.17020.

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.


最新的 Mono 版本支持 .NET 4.5,XSP 支持吗?
如果是这样,我如何确保它使用的是 4.5 而不是 4.0?


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?

即使我直接从 Mono 4.5 文件夹 (/usr/lib/mono/4.5/xsp4.exe) 运行 XSP,它也显示 ASP.NET 版本是 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.

另外,/usr/bin/xsp4 中的 XSP 配置行看起来像这样.我很困惑.

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" "$@"

推荐答案

您可以使用 --runtime 标志指示 mono 启动特定的运行时版本.在这种情况下,它会是这样的:

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" "$@"

但是,据我了解,.NET 的 4.5 配置文件不包括运行时中的更改,而是类库和编译器中的更改.因此,如果上述方法不起作用,则仅表示运行 4.5 应用程序所需的运行时版本就是 4.0.30319 版本.

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.

理解这一点的最好方法是包含这个从 Scott Hanselman 的博客中获取的小图发帖:

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

这篇关于XSP 可以运行 ASP.NET 4.5 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆