F# Global.asax — language not supported?

佐手、 提交于 2019-12-04 11:20:41

问题


Im trying to write a simple F# ASP.Net MVC app

Ive added the Global.asax as follows

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

then in a separate referenced assembly I have

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

Getting a 'F#' is not a supported language.

Am I not able to do this?

Thanks


回答1:


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 details: http://codebetter.com/matthewpodwysocki/2008/10/07/asp-net-mvc-with-nhaml-f-edition/



来源:https://stackoverflow.com/questions/5839407/f-global-asax-language-not-supported

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!