FSharp build fails in MSBuild, but works ok in Visual Studio

前端 未结 3 827
梦如初夏
梦如初夏 2021-01-12 03:05

I have a number of projects in my solution, among which also a F# project. Everything builds fine in Visual Studio, but when I try to build it with MSBuild on my TeamCity se

3条回答
  •  -上瘾入骨i
    2021-01-12 03:47

    We had the same problem with AutoFixture.AutoFoq and ZeroToNine.

    What we did was to modify the .fsproj files.

    First, you have to add

    4.3.0.0
    

    to the first .

    Second, you replace

    
    

    with this:

    
      
        
          $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
        
      
      
        
          $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
        
      
    
    
    

    Finally, replace

    
    

    with

    
    

    If you want to see this in context, you can review the ZeroToNine commit that does the above.

提交回复
热议问题