I have been playing around with Silverlight & F# and tried to make a Silverlight 4 application in VS2010 Professional.
When I try and compile my application I get the following error message...
Error 12 F# runtime for Silverlight version 开发者_开发百科v4.0 is not installed. Please go to http://go.microsoft.com/fwlink/?LinkId=177463 to download and install matching..
For the life of me I cannot find the runtime on this page or a place to download it. Does anyone know of the actual URL
It's not available yet.
"F# Runtime for Silverlight 4" will be included with the RTM release of the "Silverlight 4 Tools for Visual Studio 2010". I'm not sure exactly when that comes out; sometime in the next month I think maybe.
(In the meantime, you can use Silverlight 3.)
You can try making one for Silverlight 3, then referencing that from the Silverlight 4 Project.
I know it will let you do that in Visual Studio, Edit: Confirmed to work for a basic function (shown below). However library support will likely be bad (or spotty) due to conflicting versions, but as a stand alone library it should do ok.
module Module1
let testfunction value =
value + 1
I come along 2 years later and try to do this same thing, but see that the provided link still won't setup the F# runtime for me. I came across this post, Installing F# for Silverlight 4 runtime in VS2010 with SP1, which solved the issue for me.
Relevant detail from the page:
Download the Microsoft Silverlight 4 Tools for Visual Studio 2010
Don’t execute the installer (these tools are already installed by the VS2010 SP1 – but not all of them – see Description of Visual Studio 2010 Service Pack 1 and Microsoft Silverlight 4 Tools for Visual Studio 2010 and compare the differences)
Extract the files from the installer and look for the file FSharpRuntimeSL4.msi
Install the FSharpRuntimeSL4.msi
To validate the installation you can check if the C:\Program Files (x86)\Microsoft F#\Silverlight\Libraries\Client\v4.0 folder was created or see the you have the Microsoft F# Runtime for Silverlight 4 version 2.0.0.0 on the list of programs installed.
精彩评论