XSP 可以运行 ASP.NET 4.5 吗?

Can XSP run ASP.NET 4.5?(XSP 可以运行 ASP.NET 4.5 吗?)
本文介绍了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 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)