f#-fake

Code coverage using dotCover throws an error - FAKE F#MAKE

血红的双手。 提交于 2020-01-25 21:26:28
问题 I am trying to use DotCover in FAKE , but it is throwing some error , as I am new to FAKE as well as F# , it's becoming difficult for me to understand the root cause of the problem . Here is the code : #r "D:/FAKEProject/Fake/packages/FAKE/tools/FakeLib.dll" open Fake open Fake.DotCover let testDir = "D:/FAKEProject/Fake/test/" let filters = "" Target "Clean" (fun _ -> CleanDirs [testDir] ) Target "TestCoverage" (fun _ -> !! ("D:/FAKEProject/Fake/UnitTest/UnitTest.dll") |> DotCoverNUnit (fun

The value or constructor 'DotCoverNUnit' is not defined

我只是一个虾纸丫 提交于 2020-01-06 16:20:46
问题 We're using Fake and I'd like to run DotCover after our Build target. It's alway telling me: C:\Users\xxxxx\Dev>FAKE\tools\Fake build.fsx F# Interactive for F# 3.1 (private) Freely distributed under the Apache 2.0 Open Source License For help type #help;; > [Loading C:\Users\xxxxx\Dev\build.fsx] build.fsx(8,1): error FS0039: The value or constructor 'DotCoverNUnit' is not defined My short simple "test" script #r @"FAKE/tools/FakeLib.dll" open Fake DotCoverNUnit dotCoverOptions nUnitOptions

The value or constructor 'DotCoverNUnit' is not defined

≯℡__Kan透↙ 提交于 2020-01-06 16:20:01
问题 We're using Fake and I'd like to run DotCover after our Build target. It's alway telling me: C:\Users\xxxxx\Dev>FAKE\tools\Fake build.fsx F# Interactive for F# 3.1 (private) Freely distributed under the Apache 2.0 Open Source License For help type #help;; > [Loading C:\Users\xxxxx\Dev\build.fsx] build.fsx(8,1): error FS0039: The value or constructor 'DotCoverNUnit' is not defined My short simple "test" script #r @"FAKE/tools/FakeLib.dll" open Fake DotCoverNUnit dotCoverOptions nUnitOptions

Reading value from XML file Throws an error - FAKE F#MAKE

左心房为你撑大大i 提交于 2019-12-13 17:21:01
问题 I am trying to read value from XML file from FAKE , But I am getting an error i.e. .fsx(9,16) : eror FS000: Incomplete structurd construct at or before this point in expression. Expected '->' or other token. Below is my code , I am using XMLHelper.XMLRead to read values from xml file . #r "./packages/FAKE/tools/FakeLib.dll" open Fake open Fake.XMLHelper Target "BuildMain" (fun _ -> for s in XMLHelper.XMLRead true "D:/test/Version.Config" "/version/major/minor" trace s) "BuildMain"

How to pass a type as a function parameter in F#?

◇◆丶佛笑我妖孽 提交于 2019-12-13 04:23:29
问题 My code is below. I am writing code to group by and then average another row, which is what I have down below. But instead of passing the whole function everytime, I want to be able to just pass in the CSV or data as the function parameter in one line and do this for multiple times for different data sets. As you can see from "row.income" and ".Rows" I am using a TYPE, but when I try to call the function later with a TYPE, it gives me an error. How would I go about doing this? FYI the errors

How do you add a description to a FAKE Target?

坚强是说给别人听的谎言 提交于 2019-12-11 11:54:49
问题 Is it possible to add a description to this target? Or would I have to go about it another way? Target "Test" (fun _ -> trace "Testing stuff..." ) Edit: TargetHelper allows for the description to be shown when listTargets() is called. At least, that's my understanding from the code here: https://github.com/fsharp/FAKE/blob/master/src/app/FakeLib/TargetHelper.fs#L360-L365 回答1: If you just want to make your build script readable, you can add a comment in the normal F# way: // Tests some stuff

Any way to check-in into TFS from FAKE build target?

谁说我不能喝 提交于 2019-12-11 02:14:28
问题 I'm trying to create FAKE(F# Make) build target that will update AssemblyInfo files in my project after sucsess build. Version info files are stored in TFS CVS, so I need to checkin updated files to TFS from FAKE build task. Using TFS 2010, call FAKE from custom activity. My flow is: - ... cleanup, call build target - Update AssemblyInfo files - Check-in files to TFS Faced with check-in to TFS issues... Is there any way to check-in to TFS from FAKE (F# Make) target? 回答1: Yes, but this will

Is there an option to list the targets (maybe with a description) in fake?

主宰稳场 提交于 2019-12-11 00:38:54
问题 In Ruby (RAKE) you can document your tasks in the following way # rakefile desc "cleans ./temp" task :clean do p :cleaning end desc "compile the source" task :compile => :clean do p :compiling end $ rake -T # Display the tasks with descriptions, then exit. rake clean # cleans ./temp rake compile # compile the source Is this possible with fake ? 回答1: The same is implemented in FAKE, as I found out when reading the source // build.fsx Description "remove temp/" Target "Clean" (fun _ ->

Can I pass a parameter to a F# FAKE build script?

一笑奈何 提交于 2019-12-05 09:10:06
问题 I'm just getting started with FAKE. I really like the idea. In the tutorials the set the build and deploy directories. // Directories let buildDir = "./build/" let testDir = "./test/" let deployDir = "./deploy/" and then later reference those which is fine, but is it possible to pass that as a parameter? Maybe to as Task where I can use it later? 回答1: Something like this should work. From the command-line: "..\packages\Fake.3.7.5\tools\Fake.exe" "build.fsx" dir=my/custom/dir/ In the build.fsx

Executing a Powershell Script in Fake

假如想象 提交于 2019-12-04 00:43:52
问题 What is the best way to go about executing a Powershell script in the Fake build automation tool ? I feel that there should be an obvious answer to this question, but have not been able to find anything by searching. 回答1: As you mention in your comment, using the PowerShell class makes this very easy. #r "FakeLib.dll" #r "System.Management.Automation" open Fake open System.Management.Automation Target "RunSomePowerShell" <| fun _ -> PowerShell.Create() .AddScript("(Get-Process | ? ProcessName