Building a solution including an F# project using a build service on a windows server with F# runtime 2.0
I am trying to make work the TF开发者_C百科S 2010 build service (on a Windows Server SP2). The solution I want to get built includes many C# projects and one F# project. On my own PC, where I have Microsoft Visual Studio 2010 (Version 10.0.40219.1 SP1Rel, Microsoft .NET Framework, Version 4.0.30319 SP1Rel) installed with F#, I can build the solution. When I created my TFS Build definition (Via Team Explorer -> right click 'All Build Definitions' -> 'New Build Definition') I only selected default stuff and specified a drop folder on a server share.
On the server I have installed the VS 2010 F# Runtime 2.0 from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=13450
When queuing the build it runs for a while and then outputs the following error: C:\Builds\1\Processing\SM0021\Sources\Processing\Libraries\Syntune.Math\Release\Syntune.Math.FSharp\Syntune.Math.FSharp.fsproj (39): The imported project "C:\Program Files\Microsoft F#\v4.0\Microsoft.FSharp.Targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
I do not know whether the build definition needs to specify how the Build Service should find the F# runtime, if I need to install some other F# package/distribution or if I must do something else. Or if this simply cannot be accomplishe dby a TFS build service.
Is this related to the F# runtime or is it something wrong with my build definition? Can I copy files from my PC to the server and register them in the GAC?
The "F# runtime" does not include a compiler (and it also doesn't include targets
file for MS BUILD).
If you can do that, then the easiest option would be to install Visual Studio with F# on the build machine. If that's not an option, you can try installing standalone version of F#, which includes a compiler. However, I'm not sure if the TFS build service will find this installation automatically.
精彩评论