I've got an ASPX page like this:
<%@ Page Language="F#" %>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<%-- Try to output "This is a Test" 10 times --%>
<% for i = 1 To 10 do %>
<p>This is a test</p>
</body>
</html>
and a web.config that looks like 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 I run my VS2010 WebApp, I get an error like this:
"The CodeDom provider type "Microsoft.FSharp.Compiler.CodeDom.FSharpAspNetCodeProvider,
FSharp.Compiler.CodeDom, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=a19089b1c74d0809" could not be located."
I've tried the settings mentioned by manojlds here, but they don't seem to be working for me either. I think it is because my copy of VS2010 Pro has a newer version of the F# compiler, but I don't know how to tell for sure.
Can someone help me understand the correct version settings that I should use in a VS2010 web.config for the "compiler" and "providerOption" elements?