Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It is possible to use the May CTP templates with the October CTP version of F#</p> <p>Create your new project, then unload it and edit the hint path for the FSharp.Core.dll to point to the October CTP,</p> <pre><code>&lt;HintPath&gt;$(ProgramFiles)\fsharp-1.9.7.8\Silverlight\2.0\bin\FSharp.Core.dll&lt;/HintPath&gt; </code></pre> <p>then reload the project and build.</p> <p>You do have to package the .xap file manually by e.g. using the <code>chiron</code> tool (or just zipping and renaming)</p> <p>The AppManifest.xaml file looks like </p> <pre><code>&lt;Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" RuntimeVersion="3.0.40818.0" EntryPointAssembly="astroclock-fs" EntryPointType="astroclock.fs.MyApp"&gt; &lt;Deployment.Parts&gt; &lt;AssemblyPart x:Name="astroclock-fs" Source="astroclock-fs.dll" /&gt; &lt;AssemblyPart x:Name="FSharp.Core" Source="FSharp.Core.dll" /&gt; &lt;/Deployment.Parts&gt; &lt;/Deployment&gt; </code></pre> <p>where you fill in your own assembly name and entrypoint instead of mine</p> <p>Create a folder in $(ProjectDir) to hold all the files to be packaged and copy C:\Program Files\FSharp-1.9.7.8\Silverlight\2.0\bin\FSharp.Core.dll into it, along with the AppManifest.xaml above</p> <p>Create an empty file null.py in the folder to keep chiron quiet if you are using that tool</p> <p>Add the following post-build steps</p> <pre><code>cd $(ProjectDir) copy /y $(OutDir)$(TargetFileName) [your directory with all the output] "C:\Program Files\IronPython 2.0\Silverlight\bin\chiron.exe" /d:[your directory with all the output] /z:app.xap </code></pre> <p>Create a test page to load app.xap </p> <p>Build project</p> <p>Load page in browser and enjoy</p> <p>ADDED </p> <p>You can make a permanent fix for the hint path needed to find FSharp.Core.dll by editing the template in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache\FSharp\Silverlight\SilverlightLibrary3.zip\SilverlightLibrary.fsproj (and probably the version of the file in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\FSharp\Silverlight\SilverlightLibrary3.zip just to be certain).</p> <p>And a working proof of concept (source and everything bundled into the xap) <a href="http://www.stevegilham.com/silverlight/astroclock.fs.html" rel="nofollow noreferrer">here</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload