So it turns out that the parallel environment actually makes my work easier. Mono is installed in / usr, and F # is installed on / usr / local, so I need to configure symbolic links to enable FSharp targets and common goals to see each other. This is described in detail here: F # and XBuild (Debian)
Once this was set up, I still had problems. After adding some debugging messages, I found that xbuild did not correctly resolve the path to F # objects. The project file tried to import like this:
<Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="!Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" /> <Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition="Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />
and xbuild ran into the problem of resolving the relative path. So I just changed it to the following:
<Import Project="$(TargetsPath)" Condition="$(TargetsPath) != ''" /> <Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="$(TargetsPath) == '' And !Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" /> <Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition="$(TargetsPath) == '' And Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />
which allows me to pass the path to FSharp.targets on the command line.
There are still several problems (in the absence of a complaint that the elements are not being registered, I know that this is a weakness in xbuild, but it seems to be a false alarm - the project is really being created and runs successfully). Hope this helps someone else.
source share