开发者

Mono Tools Run in mono .net 4

I am using the Mono Tools from mono-tools.org and when I try to run my ASP MVC3 project in mono using the mono menu, I get the following error:

Mono Tools Run in mono .net 4

Is there a way to set to compile using the .net 4 compiler? I have set targetFramework in the project file to v4.0.

I have also tried setting the command line argument on the mono-tools advanced page to be --with-profile4=yes which still results in the same error.

Output from mono --version

开发者_如何学C
Mono JIT compiler version 2.10.2 (tarball) 
Copyright (C) 2002-2011 Novell, Inc and Contributors. www.mono-project.com
    TLS:           normal
    SIGSEGV:       normal
    Notification:  Thread + polling
    Architecture:  x86
    Disabled:      none
    Misc:          softdebug
    LLVM:          supported, not enabled.
    GC:            Included Boehm (with typed GC and Parallel Mark)


The targetFramework attribute does not exist in this context -- by the time your application configuration is examined, the runtime has already been started. It needs to know what framework version before it even reads your web.config.

You need to handle this in your Apache configuration. See this question. You need to use the MonoServerPath Apache directive to tell Apache that the mod_mono hosting process is /usr/bin/mod-mono-server4 (or whatever the path is on your machine).

If you are deploying with XSP then you'd have to run xsp4.

(IIS is not special in this regard either -- you have to assign your application to an app pool, and you have to explicitly set the runtime version for each pool you create.)

Side note: If the tools you are using are adding this attribute to your configuration, this is a bug in that tool.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜