4

I'm tinkering with AzureDevops for the first time, to set up some CI tasks.

I have a public repository (opensource) with a solution (.sln) that has 3 F# projects. The solution builds fine in Windows/Mac/Linux.

However, if I try to set up a build pipeline with Azure Devops Pipelines, I get the error:

src\GWallet.Backend\GWallet.Backend.fsproj(0,0): Error MSB4057: The target "Build" does not exist in the project.

Logs here.

My suspicion is that the build agent that is assigned to execute this doesn't have the F# tooling installed. Because I guess that the target "Build" is defined in the well-known Microsoft.FSharp.Targets file.

How to configure the Windows(VS2017) build agent to install the F# tooling so that this file is discoverable?

knocte
  • 16,941
  • 11
  • 79
  • 125

1 Answers1

0

@nosami suggested a workaround, which I'm not very happy about (i.e.: I still think AzureDevops team should fix their default hosted agent to include F# tooling), but does the job: use the Microsoft.FSharp.Targets file provided by the nuget package called FSharp.Compiler.Tools. This is the diff in my opensource project if you're curious.

UPDATE: In case the above doesn't help or looks too intricated for you, I think one of this two answers could work: adjusting MSBuild properties of your project or using the proper version of MSBuild could work as well and is simpler.

knocte
  • 16,941
  • 11
  • 79
  • 125