diff --git a/Fake.sln b/Fake.sln index 1efeafee4ce..0e5fc1af42a 100644 --- a/Fake.sln +++ b/Fake.sln @@ -77,8 +77,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.DotNet.Xamarin", "src\ EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Net.Http", "src\app\Fake.Net.Http\Fake.Net.Http.fsproj", "{D24CEE35-B6C0-4C92-AE18-E80F90B69974}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "dotnet-fake", "src\app\dotnet-fake\dotnet-fake.fsproj", "{DB27F0BB-D546-42B2-85DA-52870B4424FD}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCAC5CAB-03C8-4C11-ADBE-A0D05F6A4F18}" EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Core.UnitTests", "src\test\Fake.Core.UnitTests\Fake.Core.UnitTests.fsproj", "{31A5759B-B562-43C0-A845-14EFA4091543}" @@ -627,18 +625,6 @@ Global {D24CEE35-B6C0-4C92-AE18-E80F90B69974}.Release|x64.Build.0 = Release|Any CPU {D24CEE35-B6C0-4C92-AE18-E80F90B69974}.Release|x86.ActiveCfg = Release|Any CPU {D24CEE35-B6C0-4C92-AE18-E80F90B69974}.Release|x86.Build.0 = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|x64.ActiveCfg = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|x64.Build.0 = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|x86.ActiveCfg = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|x86.Build.0 = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|Any CPU.Build.0 = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|x64.ActiveCfg = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|x64.Build.0 = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|x86.ActiveCfg = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|x86.Build.0 = Release|Any CPU {31A5759B-B562-43C0-A845-14EFA4091543}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {31A5759B-B562-43C0-A845-14EFA4091543}.Debug|Any CPU.Build.0 = Debug|Any CPU {31A5759B-B562-43C0-A845-14EFA4091543}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1195,7 +1181,6 @@ Global {4BCE4F9C-8FC2-4207-81F1-20CB07D852DC} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {13C1F95D-2FAD-4890-BF94-0AE7CF9AB2FC} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {D24CEE35-B6C0-4C92-AE18-E80F90B69974} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} - {DB27F0BB-D546-42B2-85DA-52870B4424FD} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {31A5759B-B562-43C0-A845-14EFA4091543} = {CCAC5CAB-03C8-4C11-ADBE-A0D05F6A4F18} {D8850C67-0542-427A-ABCB-92174EA42C95} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {8D72BED1-BC02-4B23-A631-4849BD0FD3E1} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} diff --git a/README.md b/README.md index 3e2f09a5223..6b0f9764e15 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,14 @@ Visual Studio or MonoDevelop, which provide syntax highlighting and code complet The new DSL was designed to be succinct, typed, declarative, extensible and easy to use. -See the [project home page](https://fake.build/) for tutorials and [API documentation](http://fake.build/apidocs/v5/index.html). +See the [project home page](https://fake.build/) for tutorials and [API documentation](https://fake.build/apidocs/v5/index.html). ## Build the project * Either: Download and install the [Dotnet SDK](https://www.microsoft.com/net/learn/get-started) and run `dotnet tool restore` followed by `dotnet fake build` * Or: Install FAKE 5 (for example via `choco install fake -pre`) and run `fake build` -> Note: You can find more details on the [contributing page](http://fsharp.github.com/FAKE/contributing.html) +> Note: You can find more details on the [contributing page](https://fake.build/contributing.html) Make sure to have long path enabled: https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing Otherwise the test-suite will fail (However, the compilation should work) @@ -29,8 +29,8 @@ Otherwise the test-suite will fail (However, the compilation should work) ## How to contribute code -See the [contributing page](http://fsharp.github.com/FAKE/contributing.html). +See the [contributing page](https://fake.build/contributing.html). ## Maintainers -Although this project is hosted in the [fsharp](https://github.com/fsharp) repository for historical reasons, it is _not_ maintained and managed by the F# Core Engineering Group. The F# Core Engineering Group acknowledges that the independent owner and maintainer of this project is [Steffen Forkmann](http://github.com/forki). +Although this project is hosted in the [fsharp](https://github.com/fsharp) repository for historical reasons, it is _not_ maintained and managed by the F# Core Engineering Group. The F# Core Engineering Group acknowledges that the independent owner and maintainer of this project is [Steffen Forkmann](https://github.com/forki). diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 3ffab6467eb..d60365b56db 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,15 +1,24 @@ # Release Notes +## 5.19.1 - 2019-02-10 + +* ANNOUNCEMENT: `dotnet-fake` cli tool via `DotNetCliToolReference` is now history - https://github.com/fsharp/FAKE/issues/2465 +* ENHANCEMENT: Update MSTest.fs for VS 2019, thanks @0x53A - https://github.com/fsharp/FAKE/pull/2450 +* ENHANCEMENT: Added `CreateProcess.addOnStartedEx` in order to retrieve the .NET Process object, thanks @maciej-izak - https://github.com/fsharp/FAKE/pull/2451 +* BUGFIX: Improved error reporting when paket initialization fails, see https://github.com/isaacabraham/vsts-fsharp/issues/33 +* DOCS: Fixed typos and improved docs, thanks @ncave, @rmunn, @jeremyabbott, @mjul, @smoothdeveloper - https://github.com/fsharp/FAKE/pull/2449 https://github.com/fsharp/FAKE/pull/2452 https://github.com/fsharp/FAKE/pull/2454 https://github.com/fsharp/FAKE/pull/2459 https://github.com/fsharp/FAKE/pull/2460 +* INFRASTRUCTURE: Use stable version of reference assemblies package, thanks @teo-tsirpanis - https://github.com/fsharp/FAKE/pull/2463 + ## 5.19.0 - 2019-12-19 * NEW: Added `Fake.Sql.SqlPackage` which is a redesign or `Fake.Sql.DacPac` and added support for publish profiles, thanks @kmadof - https://github.com/fsharp/FAKE/pull/2366 -* EHNANCEMENT: `Fake.DotNet.Cli` Add timeout field to kill the process after the given timeout - https://github.com/fsharp/FAKE/pull/2425 -* EHNANCEMENT: `Fake.Core.Target` Add notification when a fake worker is idle - https://github.com/fsharp/FAKE/pull/2425 -* EHNANCEMENT: Use SPDX license expressions in the nuspec files, thanks @teo-tsirpanis - https://github.com/fsharp/FAKE/pull/2403 +* ENHANCEMENT: `Fake.DotNet.Cli` Add timeout field to kill the process after the given timeout - https://github.com/fsharp/FAKE/pull/2425 +* ENHANCEMENT: `Fake.Core.Target` Add notification when a fake worker is idle - https://github.com/fsharp/FAKE/pull/2425 +* ENHANCEMENT: Use SPDX license expressions in the nuspec files, thanks @teo-tsirpanis - https://github.com/fsharp/FAKE/pull/2403 * ENHANCEMENT: `fake-cli` Update bundled paket - https://github.com/fsharp/FAKE/pull/2425 * ENHANCEMENT: `Fake.DotNet.Cli` Add support for suppressing copyright messages (`--nologo`) when invoking `dotnet`, thanks @objectx - https://github.com/fsharp/FAKE/pull/2436 -* EHNANCEMENT: `Fake.Installer.Squirrel` Add additional Squirrel parameters, thanks @pchinery - https://github.com/fsharp/FAKE/pull/2431 -* EHNANCEMENT: `Fake.Testing.SonarQube` Several improvements like workdir and local tool support, thanks @vilinski - https://github.com/fsharp/FAKE/pull/2438 +* ENHANCEMENT: `Fake.Installer.Squirrel` Add additional Squirrel parameters, thanks @pchinery - https://github.com/fsharp/FAKE/pull/2431 +* ENHANCEMENT: `Fake.Testing.SonarQube` Several improvements like workdir and local tool support, thanks @vilinski - https://github.com/fsharp/FAKE/pull/2438 * BUGFIX: `Fake.Tools.Rsync` Fix typo in Rsync.fs options, thanks @rmunn - https://github.com/fsharp/FAKE/pull/2432 * BUGFIX: `Fake.DotNet.Testing.Coverlet` Fix Coverlet output property name, thanks @SteveGilham - https://github.com/fsharp/FAKE/pull/2427 * BUGFIX: `Fake.Tools.Octo` Octopus deploy trace always marked failures, thanks @ids-pfinn - https://github.com/fsharp/FAKE/pull/2428 @@ -191,7 +200,13 @@ * DOCS: Resort TraceSecrets.register indexed parameters - https://github.com/fsharp/FAKE/pull/2254 * DOCS: fix broken links #2241 - https://github.com/fsharp/FAKE/pull/2241 -## 4.64.16 - 2019-02-15 +#### 4.64.18 - 2020-01-30 +* Add Dynamics Business Central 365 support + +#### 4.64.17 - 2019-03-19 +* Add support for MSBuild16 + +#### 4.64.16 - 2019-02-15 * Add Dynamics NAV FullCompile function ## 4.64.14 - 2019-01-07 diff --git a/build.fsx b/build.fsx index 3fc200442ff..edf9bd76c90 100644 --- a/build.fsx +++ b/build.fsx @@ -237,8 +237,7 @@ let common = [ // New FAKE libraries let dotnetAssemblyInfos = - [ "dotnet-fake", "Fake dotnet-cli command line tool" - "fake-cli", "Fake global dotnet-cli command line tool" + [ "fake-cli", "Fake global dotnet-cli command line tool" "Fake.Api.GitHub", "GitHub Client API Support via Octokit" "Fake.Api.HockeyApp", "HockeyApp Integration Support" "Fake.Api.Slack", "Slack Integration Support" diff --git a/help/markdown/fake-gettingstarted.md b/help/markdown/fake-gettingstarted.md index 0140f45c84a..dafac800d3e 100644 --- a/help/markdown/fake-gettingstarted.md +++ b/help/markdown/fake-gettingstarted.md @@ -79,10 +79,6 @@ There are various ways to install FAKE 5:

These scripts have no versioning story. You either need to take care of versions yourself (and lock them) or your builds might break on major releases.

-* (No longer recommended) Use it as a dotnet tool (legacy): Add `` to your dependencies and run `dotnet fake ...` instead of `fake ...`, see [this example](https://github.com/FakeBuild/fake-bootstrap/blob/master/dotnet-fake.csproj) - -* (No longer recommended) Bootstrap via paket `clitool` (legacy), this is basically the same as `DotNetCliToolReference` but managed via paket. See the [`paket_clitool`](https://github.com/FakeBuild/fake-bootstrap/tree/paket_clitool) branch of `fake-bootstrap` in particular the [build.proj](https://github.com/FakeBuild/fake-bootstrap/blob/paket_clitool/build.proj) file. - now you can use
fake --help
diff --git a/help/markdown/fake-template.md b/help/markdown/fake-template.md index 7bd46adbb83..0fa40385d3c 100644 --- a/help/markdown/fake-template.md +++ b/help/markdown/fake-template.md @@ -31,7 +31,6 @@ Specifies your prefered way to bootstrap FAKE. - `local` (default) - Installs the FAKE dotnet sdk local tool into the `dotnet-tools.json` manifest. This requires an dotnet SDK version 3 or higher. - `tool` - Installs the FAKE dotnet sdk global tool into the `--tool-path` folder -- `project` - Creates a `build.proj` and uses `DotNetCliToolReference` to bootstrap FAKE - `none` - Does not bootstrap FAKE. Use this if you want to use a global installation of FAKE ### --dependencies @@ -51,4 +50,4 @@ Specifies your prefered way to define build tasks inside your build script: Specifies the folder for the fake-cli tool. This parameter is only applicable when `tool` option is used for bootstrapping with `--bootstrap`. Defaults to `.fake`. ### --version -Specifies the version of FAKE to install. Defaults to `5.*`. This parameter is only applicable when either `local`, `tool` or `project` is used for bootstrapping. +Specifies the version of FAKE to install. Defaults to `5.*`. This parameter is only applicable when either `local` or `tool` is used for bootstrapping. diff --git a/help/templates/indexpage.cshtml b/help/templates/indexpage.cshtml index 1213a4dd959..c111476c29c 100644 --- a/help/templates/indexpage.cshtml +++ b/help/templates/indexpage.cshtml @@ -147,8 +147,8 @@

Target dependencies

Targets in your build script might have dependencies on other targets - like cleaning up your output folder before building your app. FAKE supports specifing - dependenies between your targets. While it might look a bit strange at first, just read it from + like cleaning up your output folder before building your app. FAKE supports specifying + dependencies between your targets. While it might look a bit strange at first, just read it from the bottom to the top.
diff --git a/src/Directory.Build.props b/src/Directory.Build.props index c482147ff79..68b72e07185 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -4,9 +4,9 @@ .pdb; $(AllowedOutputExtensionsInPackageBuildOutputFolder) - + all runtime; build; native; contentfiles; analyzers - \ No newline at end of file + diff --git a/src/app/Fake.Core.Process/CreateProcess.fs b/src/app/Fake.Core.Process/CreateProcess.fs index 142ae97857d..ecdda7fa296 100644 --- a/src/app/Fake.Core.Process/CreateProcess.fs +++ b/src/app/Fake.Core.Process/CreateProcess.fs @@ -52,6 +52,12 @@ type CreateProcess<'TRes> = member x.WorkingDirectory = x.InternalWorkingDirectory member x.Environment = x.InternalEnvironment +/// Some information regaring the started process +type StartedProcessInfo = + internal { + InternalProcess : Process + } + member x.Process = x.InternalProcess /// Module for creating and modifying CreateProcess<'TRes> instances. /// You can manage: @@ -173,8 +179,8 @@ module CreateProcess = |> EnvMap.ofSeq |> Some Streams = - { StandardInput = if p.RedirectStandardError then CreatePipe StreamRef.Empty else Inherit - StandardOutput = if p.RedirectStandardError then CreatePipe StreamRef.Empty else Inherit + { StandardInput = if p.RedirectStandardInput then CreatePipe StreamRef.Empty else Inherit + StandardOutput = if p.RedirectStandardOutput then CreatePipe StreamRef.Empty else Inherit StandardError = if p.RedirectStandardError then CreatePipe StreamRef.Empty else Inherit } Hook = emptyHook @@ -333,7 +339,7 @@ module CreateProcess = (fun state p -> ()) (fun prev state exitCode -> prev) (fun _ -> f ()) - /// Execute the given function right after the process is started. + /// Execute the given function right after the process is started. let addOnStarted f (c:CreateProcess<_>) = c |> appendSimpleFuncs @@ -341,6 +347,16 @@ module CreateProcess = (fun state p -> f ()) (fun prev state exitCode -> prev) ignore + + /// Execute the given function right after the process is started. + /// PID for process can be obtained from p parameter (p.Process.Id). + let addOnStartedEx (f:StartedProcessInfo -> _) (c:CreateProcess<_>) = + c + |> appendSimpleFuncs + ignore + (fun state p -> f { InternalProcess = p }) + (fun prev state exitCode -> prev) + ignore /// Sets the given environment variables let withEnvironment (env: (string * string) list) (c:CreateProcess<_>)= diff --git a/src/app/Fake.Core.ReleaseNotes/Changelog.fs b/src/app/Fake.Core.ReleaseNotes/Changelog.fs index 0a20986f9fb..3ba0bd226ab 100644 --- a/src/app/Fake.Core.ReleaseNotes/Changelog.fs +++ b/src/app/Fake.Core.ReleaseNotes/Changelog.fs @@ -1,5 +1,5 @@ /// Contains helpers which allow to parse Change log text files. -/// These files have to be in a format as described on http://keepachangelog.com/en/0.1.0/ +/// These files have to be in a format as described on http://keepachangelog.com/en/1.1.0/ /// /// ## Sample /// diff --git a/src/app/Fake.Core.ReleaseNotes/ReleaseNotes.fs b/src/app/Fake.Core.ReleaseNotes/ReleaseNotes.fs index 7b9dece09d4..cbe9f78335f 100644 --- a/src/app/Fake.Core.ReleaseNotes/ReleaseNotes.fs +++ b/src/app/Fake.Core.ReleaseNotes/ReleaseNotes.fs @@ -22,10 +22,11 @@ /// /// ## Sample /// -/// let release = -/// ReadFile "RELEASE_NOTES.md" -/// |> ReleaseNotesHelper.parseReleaseNotes -/// +/// +/// #r "paket: +/// nuget Fake.Core.ReleaseNotes //" +/// +/// let release = ReleaseNotes.load "RELEASE_NOTES.md" /// /// Target "AssemblyInfo" (fun _ -> /// CreateFSharpAssemblyInfo "src/Common/AssemblyInfo.fs" diff --git a/src/app/Fake.DotNet.Testing.MSTest/MSTest.fs b/src/app/Fake.DotNet.Testing.MSTest/MSTest.fs index daf252c162d..e40f41fa9e4 100644 --- a/src/app/Fake.DotNet.Testing.MSTest/MSTest.fs +++ b/src/app/Fake.DotNet.Testing.MSTest/MSTest.fs @@ -8,7 +8,10 @@ open Fake.Testing.Common /// [omit] let mstestPaths = - [| @"[ProgramFilesX86]\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\"; + [| @"[ProgramFilesX86]\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\"; + @"[ProgramFilesX86]\Microsoft Visual Studio\2019\Professional\Common7\IDE\"; + @"[ProgramFilesX86]\Microsoft Visual Studio\2019\Community\Common7\IDE\"; + @"[ProgramFilesX86]\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\"; @"[ProgramFilesX86]\Microsoft Visual Studio\2017\Professional\Common7\IDE\"; @"[ProgramFilesX86]\Microsoft Visual Studio\2017\Community\Common7\IDE\"; @"[ProgramFilesX86]\Microsoft Visual Studio 14.0\Common7\IDE"; diff --git a/src/app/Fake.Runtime/FakeRuntimeHints.fs b/src/app/Fake.Runtime/FakeRuntimeHints.fs index 2ad7ede43fa..8e732dd3eda 100644 --- a/src/app/Fake.Runtime/FakeRuntimeHints.fs +++ b/src/app/Fake.Runtime/FakeRuntimeHints.fs @@ -160,10 +160,6 @@ let retrieveHints (prepareInfo:FakeRuntime.PrepareInfo) (context:FakeContext) (r [ if findException (fun e -> e :? MissingMethodException) err then yield { Important = false; Text = "The given error might indicate a problem with the fake cache. Backup the '.fake' directory, delete it and try again. If it works or you need help consider reporting a new issue." } - if err |> findException (function - | :? FileNotFoundException as f when f.Message.Contains "System.Memory" -> true - | _ -> false) then - yield { Important = true; Text = "The error might indicate that you are using dotnet-fake with an incorrect project file.\nTry adding 'netcoreapp2.0' to your project file, see https://github.com/fsharp/FAKE/issues/2097 for details." } if not config.VerboseLevel.PrintVerbose && Environment.GetEnvironmentVariable "FAKE_DETAILED_ERRORS" <> "true" then yield { Important = false; Text = "To further diagnose the problem you can run fake in verbose mode `fake -v run ...` or set the 'FAKE_DETAILED_ERRORS' environment variable to 'true'" } diff --git a/src/app/Fake.Tools.Octo/Octo.fs b/src/app/Fake.Tools.Octo/Octo.fs index 246278386ef..653fb05dee6 100644 --- a/src/app/Fake.Tools.Octo/Octo.fs +++ b/src/app/Fake.Tools.Octo/Octo.fs @@ -134,7 +134,7 @@ type PushOptions = { /// if the package already exists, should this package overwrite it? ReplaceExisting : bool /// Common parameters - Common: Options} + Common: Options } /// Option type for selecting one command type internal Command = diff --git a/src/app/Fake.netcore/Cli.fs b/src/app/Fake.netcore/Cli.fs index b8a6dd91492..66d98c0372e 100644 --- a/src/app/Fake.netcore/Cli.fs +++ b/src/app/Fake.netcore/Cli.fs @@ -9,7 +9,7 @@ let fakeArgsHint = """ General: - Fake command line is devided into runtime and script arguments. + The Fake command line is divided into runtime and script arguments. Runtime arguments control compilation and processing of the script, while script arguments are specific for the script or provided by a NuGet package. diff --git a/src/app/Fake.netcore/Program.fs b/src/app/Fake.netcore/Program.fs index 5238c036406..a913d1b1ebc 100644 --- a/src/app/Fake.netcore/Program.fs +++ b/src/app/Fake.netcore/Program.fs @@ -209,19 +209,28 @@ type CliAction = | ShowHelp | InvalidUsage of string -let handleAction (verboseLevel:VerboseLevel) (action:CliAction) = +let private initPaket (verboseLevel:VerboseLevel) = if verboseLevel.PrintPaket then Paket.Logging.verbose <- true Paket.Logging.verboseWarnings <- true Paket.Utils.autoAnswer <- Some true + // When silent we don't want Paket output + if verboseLevel.PrintNormal then + Paket.Logging.event.Publish + |> Observable.subscribe Paket.Logging.traceToConsole + else + { new System.IDisposable with + member __.Dispose() = () } + +exception PaketInitException of Exception + +let handleAction (verboseLevel:VerboseLevel) (action:CliAction) = + use consoleTrace = - // When silent we don't want Paket output - if verboseLevel.PrintNormal then - Paket.Logging.event.Publish - |> Observable.subscribe Paket.Logging.traceToConsole - else - { new System.IDisposable with - member __.Dispose() = () } + try initPaket verboseLevel + with e -> + // Hard to debug, see https://github.com/isaacabraham/vsts-fsharp/issues/33 + raise (PaketInitException e) match action with | ShowVersion -> @@ -313,6 +322,10 @@ let main (args:string[]) = parseAction rawResults exitCode <- handleAction verbLevel results with + | PaketInitException exn -> + printfn "Error while initializing Paket.Core (please report this to Paket):" + reportExn VerboseLevel.VerbosePaket exn + exitCode <- 1 | exn -> printfn "Error while parsing command line, usage is:" printf "%s" Cli.fakeArgsHint diff --git a/src/app/dotnet-fake/dotnet-fake.fsproj b/src/app/dotnet-fake/dotnet-fake.fsproj deleted file mode 100644 index 55d821c0c70..00000000000 --- a/src/app/dotnet-fake/dotnet-fake.fsproj +++ /dev/null @@ -1,26 +0,0 @@ - - - netcoreapp2.0 - $(DefineConstants);CORE_CLR;DOTNETCORE;EXPLICIT_DEPENDENCIES;NETSTANDARD;NETSTANDARD1_6 - Portable - true - dotnet-fake - Exe - - - $(DefineConstants);RELEASE - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/app/dotnet-fake/paket.references b/src/app/dotnet-fake/paket.references deleted file mode 100644 index 8398d870e81..00000000000 --- a/src/app/dotnet-fake/paket.references +++ /dev/null @@ -1,7 +0,0 @@ -group netcorerunner -FSharp.Core - -Paket.Core -Mono.Cecil -Microsoft.NETCore.App -NETStandard.Library \ No newline at end of file diff --git a/src/legacy/FakeLib/ChangeLogHelper.fs b/src/legacy/FakeLib/ChangeLogHelper.fs index def597316f7..a38e80acd57 100644 --- a/src/legacy/FakeLib/ChangeLogHelper.fs +++ b/src/legacy/FakeLib/ChangeLogHelper.fs @@ -1,5 +1,5 @@ /// Contains helpers which allow to parse Change log text files. -/// These files have to be in a format as described on http://keepachangelog.com/en/0.3.0/ +/// These files have to be in a format as described on http://keepachangelog.com/en/1.1.0/ /// /// ## Sample /// diff --git a/src/legacy/FakeLib/DynamicsNavHelper.fs b/src/legacy/FakeLib/DynamicsNavHelper.fs index 77fb3c2246a..f735afb29a1 100644 --- a/src/legacy/FakeLib/DynamicsNavHelper.fs +++ b/src/legacy/FakeLib/DynamicsNavHelper.fs @@ -112,6 +112,7 @@ let getNAVClassicPath navClientVersion = | "1000" -> @"SOFTWARE\Microsoft\Microsoft Dynamics NAV\100\RoleTailored Client" | "1100" -> @"SOFTWARE\Microsoft\Microsoft Dynamics NAV\110\RoleTailored Client" | "1300" -> @"SOFTWARE\Microsoft\Microsoft Dynamics NAV\130\RoleTailored Client" + | "1400" -> @"SOFTWARE\Microsoft\Microsoft Dynamics NAV\140\RoleTailored Client" | "501" -> @"software\microsoft\Dynamics Nav\Cside Client\W1 5.0 SP1" | "403" -> @"SOFTWARE\Navision\Microsoft Business Solutions-Navision\W1 4.00" | _ -> failwithf "Unknown NAV-Version (Client) %s" navClientVersion @@ -135,11 +136,12 @@ let getNAVServicePath navClientVersion = | "1000" -> @"SOFTWARE\Microsoft\Microsoft Dynamics NAV\100\Service" | "1100" -> @"SOFTWARE\Microsoft\Microsoft Dynamics NAV\110\Service" | "1300" -> @"SOFTWARE\Microsoft\Microsoft Dynamics NAV\130\Service" + | "1400" -> @"SOFTWARE\Microsoft\Microsoft Dynamics NAV\140\Service" | _ -> failwithf "Unknown NAV-Version (Service) %s" navClientVersion match navClientVersion with | "601" | "602" -> getRegistryValue HKEYLocalMachine subKey "Path" - | "700"| "701"| "800" | "900" | "1000" | "1100" | "1300" -> getRegistryValue64 HKEYLocalMachine subKey "Path" + | "700"| "701"| "800" | "900" | "1000" | "1100" | "1300" | "1400" -> getRegistryValue64 HKEYLocalMachine subKey "Path" | _ -> failwithf "Unknown NAV-Version (Service) %s" navClientVersion (directoryInfo navServiceRootPath).Parent.FullName @@ "Service" @@ -576,6 +578,8 @@ let StartNavServiceTier serverMode navClientVersion = StartService "MicrosoftDynamicsNavServer$DynamicsNAV110" | "1300" -> StartService "MicrosoftDynamicsNavServer$DynamicsNAV130" + | "1400" -> + StartService "MicrosoftDynamicsNavServer$DynamicsNAV140" | _ -> failwithf "NavServiceTier of version %s unknown." navClientVersion [] @@ -591,3 +595,4 @@ let StopNavServiceTier serverMode navClientVersion = StopService "MicrosoftDynamicsNavServer$DynamicsNAV100" StopService "MicrosoftDynamicsNavServer$DynamicsNAV110" StopService "MicrosoftDynamicsNavServer$DynamicsNAV130" + StopService "MicrosoftDynamicsNavServer$DynamicsNAV140" diff --git a/src/legacy/FakeLib/MSBuildHelper.fs b/src/legacy/FakeLib/MSBuildHelper.fs index 3598180d051..93bc2d1895d 100644 --- a/src/legacy/FakeLib/MSBuildHelper.fs +++ b/src/legacy/FakeLib/MSBuildHelper.fs @@ -28,6 +28,11 @@ type MsBuildEntry = { [] let knownMsBuildEntries = [ + { Version = "16.0"; Paths = [@"\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin" + @"\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin" + @"\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin" + @"\MSBuild\Current\Bin" + @"\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"] } { Version = "15.0"; Paths = [@"\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin" @"\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin" @"\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin" @@ -130,6 +135,8 @@ let msBuildExe = traceFAKE "If you encounter msbuild errors make sure you have copied the required SDKs, see https://github.com/Microsoft/msbuild/issues/1697" elif foundExe.Contains @"\2017\" then logVerbosefn "Using msbuild of VS2017 (%s), if you encounter build errors make sure you have installed the necessary workflows!" foundExe + elif foundExe.Contains @"\2019\" then + logVerbosefn "Using msbuild of VS2019 (%s), if you encounter build errors make sure you have installed the necessary workflows!" foundExe foundExe /// [omit] diff --git a/src/template/fake-template/Content/.config/dotnet-tools.json b/src/template/fake-template/Content/.config/dotnet-tools.json index c6424f66f78..787b313fb8d 100644 --- a/src/template/fake-template/Content/.config/dotnet-tools.json +++ b/src/template/fake-template/Content/.config/dotnet-tools.json @@ -4,7 +4,7 @@ "tools": { "fake-cli": { //#if (version == "latest") - "version": "5.17.0", + "version": "5.19.0", ////#else //"version": "(version)", //#endif diff --git a/src/template/fake-template/Content/.template.config/template.json b/src/template/fake-template/Content/.template.config/template.json index 5736d8b8a07..f2bdcbab69b 100644 --- a/src/template/fake-template/Content/.template.config/template.json +++ b/src/template/fake-template/Content/.template.config/template.json @@ -16,10 +16,7 @@ "type": "parameter", "dataType": "choice", "defaultValue": "local", - "choices": [{ - "choice": "project", - "description": "Creates a build.proj file to bootstrap FAKE" - }, + "choices": [ { "choice": "tool", "description": "Uses the FAKE dotnet sdk global tool to bootstrap FAKE. The tool is installed into 'tool--path'" @@ -75,7 +72,7 @@ }, "version": { "type": "parameter", - "description": "Version of FAKE to install. This parameter is only applicable when either 'local', 'tool' or 'project' is used for bootstrapping", + "description": "Version of FAKE to install. This parameter is only applicable when either 'local' or 'tool' is used for bootstrapping", "dataType": "string", "defaultValue": "latest", "replaces": "(version)" @@ -108,10 +105,6 @@ "fake.local.cmd": "fake.cmd" } }, - { - "exclude": ["**/fake.proj.*", "**/build.proj"], - "condition": "(bootstrap != \"project\")" - }, { "rename": { "fake.proj.sh": "fake.sh", diff --git a/src/template/fake-template/Content/build.proj b/src/template/fake-template/Content/build.proj deleted file mode 100644 index 507f1db1e72..00000000000 --- a/src/template/fake-template/Content/build.proj +++ /dev/null @@ -1,14 +0,0 @@ - - - netstandard2.0 - - netcoreapp2.0 - - - - - - - - - \ No newline at end of file diff --git a/src/template/fake-template/Content/fake.proj.cmd b/src/template/fake-template/Content/fake.proj.cmd deleted file mode 100644 index ad2f810c373..00000000000 --- a/src/template/fake-template/Content/fake.proj.cmd +++ /dev/null @@ -1,2 +0,0 @@ -dotnet restore build.proj -dotnet fake %* \ No newline at end of file diff --git a/src/template/fake-template/Content/fake.proj.sh b/src/template/fake-template/Content/fake.proj.sh deleted file mode 100644 index 64c37e0b799..00000000000 --- a/src/template/fake-template/Content/fake.proj.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -eu -set -o pipefail - -dotnet restore build.proj -dotnet fake "$@" \ No newline at end of file diff --git a/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs b/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs index aa1f50bcc21..0ac819f8e70 100644 --- a/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs +++ b/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs @@ -73,8 +73,8 @@ let tests = |> CreateProcess.ensureExitCode |> Proc.run - Expect.stringContains "Expected version in stderror string" output.Result.Error version - Expect.stringContains "Expected Fake.Runtime.dll in stderror string" output.Result.Output "Fake.Runtime.dll" + Expect.stringContains "Expected version in stderror string" version output.Result.Error + Expect.stringContains "Expected Fake.Runtime.dll in stderror string" "Fake.Runtime.dll" output.Result.Error testCase "no dependencies hello world and casing #2314" <| fun _ -> diff --git a/src/test/Fake.Core.UnitTests/Fake.Core.Process.fs b/src/test/Fake.Core.UnitTests/Fake.Core.Process.fs index ada6150f8a5..a4bc457cb58 100644 --- a/src/test/Fake.Core.UnitTests/Fake.Core.Process.fs +++ b/src/test/Fake.Core.UnitTests/Fake.Core.Process.fs @@ -93,4 +93,45 @@ let tests = |> CreateProcess.fromRawCommandLine "./folder/mytool.exe" |> getRawCommandLine Expect.equal actual original "Expected to retrieve exact match" + + yield testCase "Test CreateProcess.ofStartInfo with different streams - reported on gitter" <| fun _ -> + let isRedirected s = + match s with + | StreamSpecification.Inherit -> false + | _ -> true + + let si = System.Diagnostics.ProcessStartInfo() + let actual = + si + |> CreateProcess.ofStartInfo + Expect.isFalse (isRedirected actual.Streams.StandardInput) "Expect Std Input to be NOT redirected" + Expect.isFalse (isRedirected actual.Streams.StandardOutput) "Expect Std Output to be NOT redirected" + Expect.isFalse (isRedirected actual.Streams.StandardError) "Expect Std Error to be NOT redirected" + + let si = System.Diagnostics.ProcessStartInfo() + si.RedirectStandardInput <- true + let actual = + si + |> CreateProcess.ofStartInfo + Expect.isTrue (isRedirected actual.Streams.StandardInput) "Expect Std Input to be redirected" + Expect.isFalse (isRedirected actual.Streams.StandardOutput) "Expect Std Output to be NOT redirected" + Expect.isFalse (isRedirected actual.Streams.StandardError) "Expect Std Error to be NOT redirected" + + let si = System.Diagnostics.ProcessStartInfo() + si.RedirectStandardOutput <- true + let actual = + si + |> CreateProcess.ofStartInfo + Expect.isFalse (isRedirected actual.Streams.StandardInput) "Expect Std Input to be NOT redirected" + Expect.isTrue (isRedirected actual.Streams.StandardOutput) "Expect Std Output to be redirected" + Expect.isFalse (isRedirected actual.Streams.StandardError) "Expect Std Error to be NOT redirected" + + let si = System.Diagnostics.ProcessStartInfo() + si.RedirectStandardError <- true + let actual = + si + |> CreateProcess.ofStartInfo + Expect.isFalse (isRedirected actual.Streams.StandardInput) "Expect Std Input to be NOT redirected" + Expect.isFalse (isRedirected actual.Streams.StandardOutput) "Expect Std Output to be NOT redirected" + Expect.isTrue (isRedirected actual.Streams.StandardError) "Expect Std Error to be redirected" ] diff --git a/src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs b/src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs index ae21d07abe4..158ef7e997b 100644 --- a/src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs +++ b/src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs @@ -33,10 +33,9 @@ let installTemplateFrom pathToNupkg = type BootstrapKind = | Tool -| Project | Local | None -with override x.ToString () = match x with | Tool -> "tool" | Project -> "project" | Local -> "local" | None -> "none" +with override x.ToString () = match x with | Tool -> "tool" | Local -> "local" | None -> "none" type DslKind = | Fake @@ -126,29 +125,6 @@ let tests = let buildFile = "build.fsx" let dependenciesFile = "paket.dependencies" - // temporarily disable due to (in Azure CI) - // stdout: Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/dotnet-fake/index.json'. - // stdout: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond - // stdout: Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/dotnet-fake/index.json'. - // stdout: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond - // stdout: C:\Program Files\dotnet\sdk\2.1.508\NuGet.targets(114,5): error : Failed to retrieve information about 'dotnet-fake' from remote source 'https://api.nuget.org/v3-flatcontainer/dotnet-fake/index.json'. [D:\a\1\s\test\fake-template\emvcxqwy.2wf\build.proj] - // stdout: C:\Program Files\dotnet\sdk\2.1.508\NuGet.targets(114,5): error : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [D:\a\1\s\test\fake-template\emvcxqwy.2wf\build.proj] - // stdout: - // stdout: D:\a\1\s\test\fake-template\emvcxqwy.2wf>dotnet fake --help - // stderr: Version for package `dotnet-fake` could not be resolved. - //yield test "can install a project-style template" { - // let tempDir = tempDir() - // runTemplate tempDir Project File Fake - // invokeScript tempDir scriptFile "--help" |> shouldSucceed "should invoke help" - // Expect.isTrue (fileExists tempDir dependenciesFile) "the dependencies file should exist" - //} - - //yield test "can build with the project-style template" { - // let tempDir = tempDir() - // runTemplate tempDir Project File Fake - // invokeScript tempDir scriptFile "build -t All" |> shouldSucceed "should build successfully" - //} - yield test "fails to build a target that doesn't exist" { let tempDir = tempDir() runTemplate tempDir Tool File Fake diff --git a/src/test/Fake.ExpectoSupport/ExpectoHelpers.fs b/src/test/Fake.ExpectoSupport/ExpectoHelpers.fs index e80fee0e0fe..eb4b02abffa 100644 --- a/src/test/Fake.ExpectoSupport/ExpectoHelpers.fs +++ b/src/test/Fake.ExpectoSupport/ExpectoHelpers.fs @@ -99,13 +99,14 @@ module ExpectoHelpers = let! result = Task.WhenAny(t, delay) |> Async.AwaitTask if result = delay then Expecto.Tests.failtestf "Test '%s' timed out" labelPath + return result.GetAwaiter().GetResult() } match test with | Expecto.Sync test -> async { test() } |> timeoutAsync |> Expecto.Async | Expecto.SyncWithCancel test -> Expecto.SyncWithCancel (fun ct -> - Async.StartImmediate(async { test ct } |> timeoutAsync) + Async.StartImmediate(async { test (CancellationToken.None) } |> timeoutAsync) ) | Expecto.Async test -> timeoutAsync test |> Expecto.Async | Expecto.AsyncFsCheck (testConfig, stressConfig, test) ->