Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using a specific version of MSBuild in a FAKE build script

I currently have VS2013 and VS2015 installed on my machine.

By default FAKE F# Make seems to be building with VS2015.

I tried passing into my MSBuild task the VisualStudioVersion 12.0 but that didn't seem to have any effect.

I saw some articles say to change the MSBuildPath in the Fake.exe.config but I don't see the MSBuildPath in that exe.

How do I make sure it uses the MSBuild provided with Visual Studio 2012 (12.0)?

like image 377
StonesBG Avatar asked Jan 16 '15 17:01

StonesBG


1 Answers

This code works for me:

    let toolsVersion = "12.0"

    let setParams defaults =
        { defaults with
            ToolsVersion = Some(toolsVersion)
        }

    build setParams solutionPath
        |> DoNothing
like image 173
Andrew Avatar answered Nov 01 '22 22:11

Andrew