@@ -6,26 +6,38 @@ open Fake.DotNet
66open Fake.IO .FileSystemOperators
77
88open Model
9- open Dotnet
109
11- let rootDir = System.Environment.CurrentDirectory
1210
13- let clean ( solution : Solution ) = dotnet rootDir ( sprintf " clean %s --configuration Release --verbosity minimal" solution.SolutionFile)
11+ let private dotnet command =
12+ DotNet.exec id command " " |> ignore< ProcessResult>
1413
15- let restoreWeak ( solution : Solution ) = dotnetWeak rootDir ( sprintf " restore %s --verbosity minimal" solution.SolutionFile)
16- let restoreStrong ( solution : Solution ) = dotnetStrong rootDir ( sprintf " restore %s --verbosity minimal" solution.SolutionFile)
14+ let private dotnetWeak command =
15+ let properties = [ ( " StrongName" , " False" ) ]
16+ let suffix = properties |> List.map ( fun ( name , value ) -> sprintf """ /p:%s ="%s " /nr:false """ name value) |> String.concat " "
17+ DotNet.exec id command suffix |> ignore< ProcessResult>
1718
18- let buildWeak ( solution : Solution ) = dotnetWeak rootDir ( sprintf " build %s --configuration Release --no-incremental --no-restore --verbosity minimal" solution.SolutionFile)
19- let buildStrong ( solution : Solution ) = dotnetStrong rootDir ( sprintf " build %s --configuration Release --no-incremental --no-restore --verbosity minimal" solution.SolutionFile)
19+ let private dotnetStrong command =
20+ let properties = [ ( " StrongName" , " True" ) ]
21+ let suffix = properties |> List.map ( fun ( name , value ) -> sprintf """ /p:%s ="%s " /nr:false """ name value) |> String.concat " "
22+ DotNet.exec id command suffix |> ignore< ProcessResult>
2023
21- let packWeak ( solution : Solution ) = dotnetWeak rootDir ( sprintf " pack %s --configuration Release --no-restore --verbosity minimal" solution.SolutionFile)
22- let packStrong ( solution : Solution ) = dotnetStrong rootDir ( sprintf " pack %s --configuration Release --no-restore --verbosity minimal" solution.SolutionFile)
24+
25+ let clean ( solution : Solution ) = dotnet ( sprintf " clean %s --configuration Release --verbosity minimal" solution.SolutionFile)
26+
27+ let restoreWeak ( solution : Solution ) = dotnetWeak ( sprintf " restore %s --verbosity minimal" solution.SolutionFile)
28+ let restoreStrong ( solution : Solution ) = dotnetStrong ( sprintf " restore %s --verbosity minimal" solution.SolutionFile)
29+
30+ let buildWeak ( solution : Solution ) = dotnetWeak ( sprintf " build %s --configuration Release --no-incremental --no-restore --verbosity minimal" solution.SolutionFile)
31+ let buildStrong ( solution : Solution ) = dotnetStrong ( sprintf " build %s --configuration Release --no-incremental --no-restore --verbosity minimal" solution.SolutionFile)
32+
33+ let packWeak ( solution : Solution ) = dotnetWeak ( sprintf " pack %s --configuration Release --no-restore --verbosity minimal" solution.SolutionFile)
34+ let packStrong ( solution : Solution ) = dotnetStrong ( sprintf " pack %s --configuration Release --no-restore --verbosity minimal" solution.SolutionFile)
2335
2436let packProjectWeak = function
25- | VisualStudio p -> dotnetWeak rootDir ( sprintf " pack %s --configuration Release --no-restore --no-build" p.ProjectFile)
37+ | VisualStudio p -> dotnetWeak ( sprintf " pack %s --configuration Release --no-restore --no-build" p.ProjectFile)
2638 | _ -> failwith " Project type not supported"
2739let packProjectStrong = function
28- | VisualStudio p -> dotnetStrong rootDir ( sprintf " pack %s --configuration Release --no-restore --no-build" p.ProjectFile)
40+ | VisualStudio p -> dotnetStrong ( sprintf " pack %s --configuration Release --no-restore --no-build" p.ProjectFile)
2941 | _ -> failwith " Project type not supported"
3042
3143let buildVS2019x86 config isIncremental subject =
@@ -44,6 +56,3 @@ let buildVS2019x64 config isIncremental subject =
4456 [( " Configuration" , config); ( " Platform" , " x64" )]
4557 subject
4658 |> ignore< string list>
47-
48- let test testsDir testsProj framework =
49- dotnet testsDir ( sprintf " run --project %s --configuration Release --framework %s --no-restore --no-build" testsProj framework)
0 commit comments