visual studio 2010 - What Are the Correct Web.Config Settings for the VS2010 F# Compiler? -
i've got aspx page this:
<%@ page language="f#" %> <!doctype html> <html> <head> <title></title> </head> <body> <%-- seek output "this test" 10 times --%> <% = 1 10 %> <p>this test</p> </body> </html>
and web.config looks this:
<?xml version="1.0"?> <configuration> <system.codedom> <compilers> <compiler language="f#;f#;fs;fsharp" extension=".fs" warninglevel="4" type="microsoft.fsharp.compiler.codedom.fsharpaspnetcodeprovider, fsharp.compiler.codedom, version=2.0.0.0, culture=neutral, publickeytoken=a19089b1c74d0809"> <provideroption name="compilerversion" value="v4.0" /> <provideroption name="warnaserror" value="false" /> </compiler> </compilers> </system.codedom> <system.web> <compilation debug="true" targetframework="4.0" /> </system.web> </configuration>
when run vs2010 webapp, error this: "the codedom provider type "microsoft.fsharp.compiler.codedom.fsharpaspnetcodeprovider, fsharp.compiler.codedom, version=2.0.0.0, culture=neutral, publickeytoken=a19089b1c74d0809" not located."
i've tried settings mentioned manojlds here, don't seem working me either. think because re-create of vs2010 pro has newer version of f# compiler, don't know how tell sure.
can help me understand right version settings should utilize in vs2010 web.config "compiler" , "provideroption" elements?
i have not tried this, configuration file looks right me - can check eversion of fsharp.compiler.codedom
assembly installed in gac (by looking @ c:\windows\assembly
)?
however, @ moment, not recommend using f# writing of aspx part of web page. works, won't smooth experience when mixing c# aspx or using razor templating engine (for asp.net mvc).
i think best way create server-side asp.net web applications in f# utilize f# code behind (in traditional webforms) or model , controller parts (in mvc). there number of templates , tutorials describe how this:
tutorial: creating web project in f# using online template and templates asp.net mvc 4 , older asp.net mvc 3 you might want check out web stacks page on fsharp.org visual-studio-2010 f#
No comments:
Post a Comment