Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is what works for me (Windows 7 x64, Visual Studio 2013 Ultimate RTM):</p> <ol> <li><p>Get and install "PowerPack for FSharp 3.0 + .NET 4.x + VS2012" from CodePlex (<a href="https://fsharppowerpack.codeplex.com/downloads/get/625449" rel="nofollow">https://fsharppowerpack.codeplex.com/downloads/get/625449</a>)</p></li> <li><p>Create the following Registry key: <code>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\AssemblyFolders\FSharp.PowerPack-1.9.9.9</code> (for x64 versions of Windows, omit the <code>Wow6432Node</code> for 32bit versions) and set its <code>(Default)</code> value to the installation directory of the F# PowerPack (e.g. "C:\Program Files (x86)\FSharpPowerPack-4.0.0.0\bin"). [This is related to a long standing/regression bug in <code>src/FSharp.PowerPack/CompilerLocationUtils.fs</code> which basically breaks tool discovery.]</p></li> <li><p>Import the PowerPack targets (AFTER importing the F# targets) in your *.fsproj file: <code>&lt;Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\FSharp.PowerPack.targets" /&gt;</code></p></li> <li><p>Update your <code>ItemGroup</code> node to something like this (use FsYacc accordingly):</p> <pre><code>&lt;ItemGroup&gt; &lt;None Include="App.config" /&gt; &lt;FsLex Include="Lexer.fsl" /&gt; &lt;Compile Include="Lexer.fs"&gt; &lt;Visible&gt;False&lt;/Visible&gt; &lt;/Compile&gt; &lt;Compile Include="Program.fs" /&gt; &lt;/ItemGroup&gt; </code></pre></li> <li><p>Include a reference to <code>FSharp.PowerPack.dll</code> and build.</p></li> </ol> <p>You should end up with a *.fsproj file similar to this:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; &lt;Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /&gt; &lt;PropertyGroup&gt; &lt;Configuration Condition=" '$(Configuration)' == '' "&gt;Debug&lt;/Configuration&gt; &lt;Platform Condition=" '$(Platform)' == '' "&gt;AnyCPU&lt;/Platform&gt; &lt;SchemaVersion&gt;2.0&lt;/SchemaVersion&gt; &lt;ProjectGuid&gt;8c565f99-d6bc-43a9-ace9-eadfe429c0f7&lt;/ProjectGuid&gt; &lt;OutputType&gt;Exe&lt;/OutputType&gt; &lt;RootNamespace&gt;FsYaccTest&lt;/RootNamespace&gt; &lt;AssemblyName&gt;FsYaccTest&lt;/AssemblyName&gt; &lt;TargetFrameworkVersion&gt;v4.5&lt;/TargetFrameworkVersion&gt; &lt;AutoGenerateBindingRedirects&gt;true&lt;/AutoGenerateBindingRedirects&gt; &lt;TargetFSharpCoreVersion&gt;4.3.1.0&lt;/TargetFSharpCoreVersion&gt; &lt;Name&gt;FsYaccTest&lt;/Name&gt; &lt;/PropertyGroup&gt; &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "&gt; &lt;!-- Snip --&gt; &lt;/PropertyGroup&gt; &lt;ItemGroup&gt; &lt;Reference Include="FSharp.PowerPack"&gt; &lt;HintPath&gt;C:\Program Files (x86)\FSharpPowerPack-4.0.0.0\bin\FSharp.PowerPack.dll&lt;/HintPath&gt; &lt;/Reference&gt; &lt;Reference Include="mscorlib" /&gt; &lt;Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"&gt; &lt;Private&gt;True&lt;/Private&gt; &lt;/Reference&gt; &lt;Reference Include="System" /&gt; &lt;Reference Include="System.Core" /&gt; &lt;Reference Include="System.Numerics" /&gt; &lt;/ItemGroup&gt; &lt;PropertyGroup&gt; &lt;MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''"&gt;11&lt;/MinimumVisualStudioVersion&gt; &lt;/PropertyGroup&gt; &lt;Choose&gt; &lt;When Condition="'$(VisualStudioVersion)' == '11.0'"&gt; &lt;PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')"&gt; &lt;FSharpTargetsPath&gt;$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets&lt;/FSharpTargetsPath&gt; &lt;/PropertyGroup&gt; &lt;/When&gt; &lt;Otherwise&gt; &lt;PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')"&gt; &lt;FSharpTargetsPath&gt;$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets&lt;/FSharpTargetsPath&gt; &lt;/PropertyGroup&gt; &lt;/Otherwise&gt; &lt;/Choose&gt; &lt;Import Project="$(FSharpTargetsPath)" /&gt; &lt;Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\FSharp.PowerPack.targets" /&gt; &lt;PropertyGroup&gt; &lt;FsLexUnicode&gt;true&lt;/FsLexUnicode&gt; &lt;/PropertyGroup&gt; &lt;ItemGroup&gt; &lt;None Include="App.config" /&gt; &lt;FsLex Include="Lexer.fsl" /&gt; &lt;Compile Include="Lexer.fs"&gt; &lt;Visible&gt;False&lt;/Visible&gt; &lt;/Compile&gt; &lt;Compile Include="Program.fs" /&gt; &lt;/ItemGroup&gt; &lt;/Project&gt; </code></pre> <p>Note: You can probably omit creating the Registry key if you provide a proper <code>FsYaccToolPath</code> as described in mike z's answer.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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