F # Global.asax - language not supported?

I am trying to write a simple F # ASP.Net MVC application

Ive added Global.asax as follows

<%@ Application Inherits="WebApplication.Core.Global" Language="F#" %> 

then in a separate reference assembly I have

 namespace WebApplication.Core with a type Global() = etc 

Getting "F #" is not supported.

Can't I do it?

thanks

+8
asp.net-mvc f # global-asax
source share
1 answer

You need to add something like below in web.config:

 <compiler language="F#;f#;fs;fsharp" extension=".fs" warningLevel="4" type="Microsoft.FSharp.Compiler.CodeDom.FSharpAspNetCodeProvider, FSharp.Compiler.CodeDom, Version=1.9.6.2, Culture=neutral, PublicKeyToken=a19089b1c74d0809"> <providerOption name="CompilerVersion" value="v3.5" /> <providerOption name="WarnAsError" value="false" /> </compiler> 

Source and more information: http://codebetter.com/matthewpodwysocki/2008/10/07/asp-net-mvc-with-nhaml-f-edition/

+7
source share

All Articles