Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So it turns out that the parallel environment was actually making things easier on me. Mono installs at /usr, while F# installs at /usr/local, so I needed to set up symlinks to enable FSharp targets and Common targets to see each other. This is detailed here: <a href="http://xtzgzorex.wordpress.com/2011/01/08/f-and-xbuild-debian/" rel="nofollow">F# and XBuild (Debian)</a></p> <p>Once this was set up, I was still having trouble. After adding some debug messages I found that xbuild was not resolving the path to F# targets correctly. Project file was trying to import like this:</p> <pre><code> &lt;Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="!Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" /&gt; &lt;Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition="Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" /&gt; </code></pre> <p>and xbuild was having trouble resolving the relative path. So I just changed it to this:</p> <pre><code> &lt;Import Project="$(TargetsPath)" Condition="$(TargetsPath) != ''" /&gt; &lt;Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="$(TargetsPath) == '' And !Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" /&gt; &lt;Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition="$(TargetsPath) == '' And Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" /&gt; </code></pre> <p>which allows me to passin the path to FSharp.targets on the command line.</p> <p>There are still a few problems (it's failing with a complaint about ItemGroups not being registered, I know this is a weakness in xbuild but it seems to be a false alarm - the project does in fact get built and run successfully). Hope this helps someone else.</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