diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 1a326ea1..98c71f92 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -38,9 +38,24 @@ $(NoWarn);NU1603 + + + /usr/bin/shasum $(PaketRestoreCacheFile) | /usr/bin/awk '{ print $1 }' + /usr/bin/shasum $(PaketLockFilePath) | /usr/bin/awk '{ print $1 }' + + + + + + + + + + - $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) - $([System.IO.File]::ReadAllText('$(PaketLockFilePath)')) + + $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) + $([System.IO.File]::ReadAllText('$(PaketLockFilePath)')) true false true @@ -137,7 +152,7 @@ - <_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)/*.nuspec"/> + <_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/> @@ -145,19 +160,20 @@ true false true - $(BaseIntermediateOutputPath)$(Configuration)/ + $(BaseIntermediateOutputPath)$(Configuration) $(BaseIntermediateOutputPath) - <_NuspecFiles Include="$(AdjustedNuspecOutputPath)*.nuspec"/> + <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.nuspec"/> - + + Seq.toList -let netcoreTestFiles = !! "tests/**/project.json" |> Seq.toList +let testAssemblies = !! "bin/Release/net40/*.Tests.dll" + +let isDotnetSDKInstalled = DotNetCli.isInstalled() -// //// -------------------------------------------------------------------------------------- //// The rest of the code is standard F# build script //// -------------------------------------------------------------------------------------- @@ -68,15 +69,7 @@ let configuration = environVarOrDefault "Configuration" "Release" let isTravisCI = (environVarOrDefault "TRAVIS" "") = "true" -Target "Build.Net35" (fun _ -> - { BaseDirectory = __SOURCE_DIRECTORY__ - Includes = [ project + ".sln" ] - Excludes = [] } - |> MSBuild "" "Build" ["Configuration", "Release-NET35" ] - |> Log "AppBuild-Output: " -) - -Target "Build.Net40" (fun _ -> +Target "Build" (fun _ -> // Build the rest of the project { BaseDirectory = __SOURCE_DIRECTORY__ Includes = [ project + ".sln" ] @@ -89,9 +82,9 @@ Target "Build.Net40" (fun _ -> // -------------------------------------------------------------------------------------- // Run the unit tests using test runner & kill test runner when complete -Target "RunTests" (fun _ -> - ActivateFinalTarget "CloseTestRunner" +Target "RunTests" DoNothing +Target "RunTests.Net40" (fun _ -> testAssemblies |> xUnit2 (fun p -> { p with @@ -99,16 +92,14 @@ Target "RunTests" (fun _ -> TimeOut = TimeSpan.FromMinutes 20. }) ) -FinalTarget "CloseTestRunner" (fun _ -> - ProcessHelper.killProcess "nunit-agent.exe" -) +Target "RunTests.NetCore" (fun _ -> + for proj in netCoreTestFiles do + DotNetCli.Test (fun c -> { c with Project = proj })) // //// -------------------------------------------------------------------------------------- //// Build a NuGet package -Target "NuGet" DoNothing - Target "NuGet.Pack" (fun _ -> Paket.Pack(fun config -> { config with @@ -117,7 +108,7 @@ Target "NuGet.Pack" (fun _ -> OutputPath = "bin" })) -Target "NuGetPush" (fun _ -> Paket.Push (fun p -> { p with WorkingDir = "bin/" })) +Target "NuGet.Push" (fun _ -> Paket.Push (fun p -> { p with WorkingDir = "bin/" })) // Doc generation @@ -146,7 +137,7 @@ open SourceLink Target "SourceLink" (fun _ -> let baseUrl = sprintf "%s/%s/{0}/%%var2%%" gitRaw project - [ yield! !! "src/**/*.??proj" ] + [ yield! !! "src/**/Argu.fsproj" ] |> Seq.iter (fun projFile -> let proj = VsProj.LoadRelease projFile SourceLink.Index proj.CompilesNotLinked proj.OutputFilePdb __SOURCE_DIRECTORY__ baseUrl @@ -154,7 +145,7 @@ Target "SourceLink" (fun _ -> ) // Github Releases - +#nowarn "85" #load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx" open Octokit @@ -194,43 +185,11 @@ Target "ReleaseGitHub" (fun _ -> |> Async.RunSynchronously ) -// .NET Core SDK and .NET Core - -let assertExitCodeZero x = if x = 0 then () else failwithf "Command failed with exit code %i" x - -Target "SetVersionInProjectJSON" (fun _ -> - for proj in netcoreSrcFiles @ netcoreTestFiles do - DotNetCli.SetVersionInProjectJson release.NugetVersion proj -) - -Target "Build.NetCore" (fun _ -> - for proj in netcoreSrcFiles @ netcoreTestFiles do - DotNetCli.Restore (fun c -> { c with Project = proj }) - - for proj in netcoreSrcFiles @ netcoreTestFiles do - DotNetCli.Build (fun c -> { c with Project = proj }) -) - -Target "RunTests.NetCore" (fun _ -> - for proj in netcoreTestFiles do - DotNetCli.Test (fun c -> { c with Project = proj }) -) - -let isDotnetSDKInstalled = DotNetCli.isInstalled() - -Target "NuGet.AddNetCore" (fun _ -> - if not isDotnetSDKInstalled then failwith "You need to install .NET core to publish NuGet packages" - for proj in netcoreSrcFiles do - DotNetCli.Pack (fun c -> { c with Project = proj }) - - let nupkg = sprintf "../../bin/Argu.%s.nupkg" (release.NugetVersion) - let netcoreNupkg = sprintf "bin/Release/Argu.%s.nupkg" (release.NugetVersion) - - Shell.Exec("dotnet", sprintf """mergenupkg --source "%s" --other "%s" --framework netstandard1.6 """ nupkg netcoreNupkg, "src/Argu/") |> assertExitCodeZero -) - +let assertExitCodeZero x = if x <> 0 then failwithf "Command failed with exit code %i" x -Target "Release" DoNothing +Target "NetCore.Restore" (fun _ -> + for proj in Seq.append netCoreSrcFiles netCoreTestFiles do + DotNetCli.Restore(fun c -> { c with Project = proj })) // -------------------------------------------------------------------------------------- // Run all targets by default. Invoke 'build ' to override @@ -238,28 +197,30 @@ Target "Release" DoNothing Target "Prepare" DoNothing Target "PrepareRelease" DoNothing Target "Default" DoNothing +Target "Bundle" DoNothing +Target "Release" DoNothing "Clean" ==> "AssemblyInfo" - ==> "SetVersionInProjectJSON" ==> "Prepare" - ==> "Build.Net40" + ==> "NetCore.Restore" + ==> "Build" + ==> "RunTests.Net40" + ==> "RunTests.NetCore" ==> "RunTests" ==> "Default" "Default" ==> "PrepareRelease" - =?> ("Build.Net35", not isTravisCI) //mono 4.x doesnt have FSharp.Core 2.3.0.0 installed - =?> ("Build.NetCore", isDotnetSDKInstalled) - =?> ("RunTests.NetCore", isDotnetSDKInstalled) ==> "NuGet.Pack" - ==> "NuGet.AddNetCore" - ==> "NuGet" ==> "GenerateDocs" ==> "SourceLink" + ==> "Bundle" + +"Bundle" ==> "ReleaseDocs" - ==> "NuGetPush" ==> "ReleaseGitHub" + ==> "NuGet.Push" ==> "Release" RunTargetOrDefault "Default" \ No newline at end of file diff --git a/docs/content/index.fsx b/docs/content/index.fsx index fee8d205..80cbcd96 100644 --- a/docs/content/index.fsx +++ b/docs/content/index.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#I "../../bin/net40" +#I "../../bin/" #r "Argu.dll" open System diff --git a/docs/content/tutorial.fsx b/docs/content/tutorial.fsx index 47549f2f..22a6dee9 100644 --- a/docs/content/tutorial.fsx +++ b/docs/content/tutorial.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#I "../../bin/net40" +#I "../../bin/" #r "Argu.dll" open System diff --git a/global.json b/global.json deleted file mode 100644 index 1e91fc3c..00000000 --- a/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "sdk": { - "version": "1.0.0-preview2-1-003177" - }, - "projects":[ "src", "tests" ] -} diff --git a/paket.dependencies b/paket.dependencies index 95c1eee2..2468282a 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,14 +1,23 @@ -redirects: on +framework: net40 source https://www.nuget.org/api/v2 +redirects: force -nuget FsCheck -nuget Unquote -nuget xunit ~> 2.0 -nuget xunit.extensions -nuget xunit.runner.console -nuget xunit.runner.visualstudio version_in_path: true +nuget FSharp.Core >= 3.1 lowest_matching:true + +group Testing + framework: net461 + source https://www.nuget.org/api/v2 + redirects: force + + nuget FSharp.Core >= 4.2 + nuget Unquote ~> 4.0 + nuget FsCheck ~> 3.0 prerelease + nuget xunit ~> 2.3 + nuget xunit.runner.console ~> 2.3 + nuget xunit.runner.visualstudio ~> 2.3 version_in_path: true group Build + framework: net461 source https://www.nuget.org/api/v2 nuget FAKE diff --git a/paket.lock b/paket.lock index 9bba270a..3d873d7f 100644 --- a/paket.lock +++ b/paket.lock @@ -1,190 +1,49 @@ -REDIRECTS: ON +REDIRECTS: FORCE +RESTRICTION: == net40 NUGET remote: https://www.nuget.org/api/v2 - FsCheck (2.6.2) - FSharp.Core (>= 3.1.2.5) - FSharp.Core (4.0.0.1) - Microsoft.NETCore.Platforms (1.1) - restriction: == dnxcore50 - Microsoft.NETCore.Targets (1.1) - restriction: == dnxcore50 - System.Collections (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.Diagnostics.Contracts (4.3) - restriction: == dnxcore50 - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.0) - System.Diagnostics.Debug (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.Globalization (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.IO (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - System.Text.Encoding (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - System.Threading.Tasks (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - System.Linq (4.3) - restriction: == dnxcore50 - System.Collections (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.6) - System.Diagnostics.Debug (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Resources.ResourceManager (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.6) - System.Runtime.Extensions (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Linq.Expressions (4.3) - restriction: == dnxcore50 - System.Collections (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Diagnostics.Debug (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Globalization (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.IO (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Linq (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Reflection (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.6) - System.Reflection.Emit.ILGeneration (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Reflection.Emit.Lightweight (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Reflection.Extensions (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Reflection.Primitives (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Reflection.TypeExtensions (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Resources.ResourceManager (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.6) - System.Runtime.Extensions (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Threading (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.ObjectModel (4.3) - restriction: == dnxcore50 - System.Collections (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.3) - System.Diagnostics.Debug (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.3) - System.Resources.ResourceManager (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.3) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.Threading (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.3) - System.Reflection (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - System.IO (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - System.Reflection.Primitives (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - System.Reflection.Emit.ILGeneration (4.3) - restriction: == dnxcore50 - System.Reflection.Emit.Lightweight (4.3) - restriction: == dnxcore50 - System.Reflection.Extensions (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (>= netstandard1.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (>= netstandard1.0) - System.Reflection (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.0) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.0) - System.Reflection.Primitives (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (>= netstandard1.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (>= netstandard1.0) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.0) - System.Reflection.TypeExtensions (4.3) - restriction: == dnxcore50 - System.Diagnostics.Contracts (>= 4.3) - restriction: == dnxcore50 - System.Diagnostics.Debug (>= 4.3) - restriction: == dnxcore50 - System.Linq (>= 4.3) - restriction: == dnxcore50 - System.Reflection (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.3) (>= netstandard1.5) - System.Reflection.Primitives (>= 4.3) - restriction: == dnxcore50 - System.Resources.ResourceManager (>= 4.3) - restriction: == dnxcore50 - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.3) (>= netstandard1.5) - System.Runtime.Extensions (>= 4.3) - restriction: == dnxcore50 - System.Resources.ResourceManager (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (>= netstandard1.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (>= netstandard1.0) - System.Globalization (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.0) - System.Reflection (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.0) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.0) - System.Runtime (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.2) (== netstandard1.3) (>= netstandard1.5) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.2) (== netstandard1.3) (>= netstandard1.5) - System.Runtime.Extensions (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.5) - System.Text.Encoding (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.Text.RegularExpressions (4.3) - restriction: == dnxcore50 - System.Collections (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Globalization (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Resources.ResourceManager (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (== netstandard1.3) (>= netstandard1.6) - System.Runtime.Extensions (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Threading (>= 4.3) - restriction: || (== dnxcore50) (>= netstandard1.6) - System.Threading (4.3) - restriction: == dnxcore50 - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.Threading.Tasks (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.Threading.Tasks (4.3) - restriction: == dnxcore50 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - System.Runtime (>= 4.3) - restriction: || (== dnxcore50) (== netstandard1.0) (>= netstandard1.3) - Unquote (3.1.2) - xunit (2.1) - xunit.assert (2.1) - xunit.core (2.1) - xunit.abstractions (2.0) - restriction: || (== dnx451) (== dnxcore50) (>= portable-net45+win8+wp8+wpa81) - xunit.assert (2.1) - System.Collections (>= 4.0) - restriction: == dnxcore50 - System.Diagnostics.Debug (>= 4.0) - restriction: == dnxcore50 - System.Globalization (>= 4.0) - restriction: == dnxcore50 - System.Linq (>= 4.0) - restriction: == dnxcore50 - System.ObjectModel (>= 4.0) - restriction: == dnxcore50 - System.Reflection (>= 4.0) - restriction: == dnxcore50 - System.Reflection.Extensions (>= 4.0) - restriction: == dnxcore50 - System.Runtime (>= 4.0) - restriction: == dnxcore50 - System.Runtime.Extensions (>= 4.0) - restriction: == dnxcore50 - System.Text.RegularExpressions (>= 4.0) - restriction: == dnxcore50 - System.Threading.Tasks (>= 4.0) - restriction: == dnxcore50 - xunit.core (2.1) - System.Collections (>= 4.0) - restriction: == dnxcore50 - System.Diagnostics.Debug (>= 4.0) - restriction: == dnxcore50 - System.Globalization (>= 4.0) - restriction: == dnxcore50 - System.Linq (>= 4.0) - restriction: == dnxcore50 - System.Reflection (>= 4.0) - restriction: == dnxcore50 - System.Reflection.Extensions (>= 4.0) - restriction: == dnxcore50 - System.Runtime (>= 4.0) - restriction: == dnxcore50 - System.Runtime.Extensions (>= 4.0) - restriction: == dnxcore50 - System.Threading.Tasks (>= 4.0) - restriction: == dnxcore50 - xunit.abstractions (>= 2.0) - restriction: == dnxcore50 - xunit.extensibility.core (2.1) - restriction: || (== dnx451) (== dnxcore50) (>= portable-net45+win8+wp8+wpa81) - xunit.extensibility.execution (2.1) - restriction: || (== dnx451) (== dnxcore50) (>= portable-net45+win8+wp8+wpa81) - xunit.extensibility.core (2.1) - restriction: || (== dnx451) (== dnxcore50) (>= portable-net45+win8+wp8+wpa81) - xunit.abstractions (2.0) - xunit.extensibility.execution (2.1) - restriction: || (== dnx451) (== dnxcore50) (>= portable-net45+win8+wp8+wpa81) - System.Collections (>= 4.0) - restriction: == dnxcore50 - System.Diagnostics.Debug (>= 4.0) - restriction: == dnxcore50 - System.Globalization (>= 4.0) - restriction: == dnxcore50 - System.IO (>= 4.0) - restriction: == dnxcore50 - System.Linq (>= 4.0) - restriction: == dnxcore50 - System.Linq.Expressions (>= 4.0) - restriction: == dnxcore50 - System.Reflection (>= 4.0) - restriction: == dnxcore50 - System.Reflection.Extensions (>= 4.0) - restriction: == dnxcore50 - System.Runtime (>= 4.0) - restriction: == dnxcore50 - System.Runtime.Extensions (>= 4.0) - restriction: == dnxcore50 - System.Text.Encoding (>= 4.0) - restriction: == dnxcore50 - System.Threading (>= 4.0) - restriction: == dnxcore50 - System.Threading.Tasks (>= 4.0) - restriction: == dnxcore50 - xunit.abstractions (>= 2.0) - restriction: == dnxcore50 - xunit.extensibility.core (2.1) - restriction: || (== dnx451) (== dnxcore50) (== monoandroid) (== monotouch) (== xamarinios) (== win8) (== wp8) (== wpa81) (>= net45) - xunit.extensions (1.9.0.1566) - xunit (>= 1.9.0.1566) - xunit.runner.console (2.1) - xunit.runner.visualstudio (2.1.0) - version_in_path: true + FSharp.Core (3.1.2) GROUP Build +RESTRICTION: == net461 NUGET remote: https://www.nuget.org/api/v2 - FAKE (4.61.3) + FAKE (4.63.2) FSharp.Compiler.Service (2.0.0.6) FSharp.Formatting (2.14.4) FSharp.Compiler.Service (2.0.0.6) FSharpVSPowerTools.Core (>= 2.3 < 2.4) FSharpVSPowerTools.Core (2.3) FSharp.Compiler.Service (>= 2.0.0.3) - Microsoft.Bcl (1.1.10) - restriction: && (< net45) (< win8) (< portable-win81+wpa81) - Microsoft.Bcl.Build (>= 1.0.14) - Microsoft.Bcl.Build (1.0.21) - import_targets: false, restriction: && (< net45) (< win8) (< portable-win81+wpa81) - Microsoft.Net.Http (2.2.29) - restriction: && (< net45) (< win8) (< portable-win81+wpa81) - Microsoft.Bcl (>= 1.1.10) - Microsoft.Bcl.Build (>= 1.0.14) - NuGet.CommandLine (4.1) - Octokit (0.24) - Microsoft.Net.Http - restriction: && (< net45) (< win8) (< portable-win81+wpa81) + NuGet.CommandLine (4.4.1) + Octokit (0.28) SourceLink.Fake (1.1) GITHUB remote: fsharp/FAKE - modules/Octokit/Octokit.fsx (15e1b741f4ae9fbaad640a65231dfcec28ce6ddd) - Octokit (>= 0.20) \ No newline at end of file + modules/Octokit/Octokit.fsx (0341a2e614eb2a7f34607cec914eb0ed83ce9add) + Octokit (>= 0.20) +GROUP Testing +REDIRECTS: FORCE +RESTRICTION: == net461 +NUGET + remote: https://www.nuget.org/api/v2 + FsCheck (3.0.0-alpha2) + FSharp.Core (>= 4.1) + FSharp.Core (4.2.3) + Unquote (4.0) + xunit (2.3.1) + xunit.analyzers (>= 0.7) + xunit.assert (2.3.1) + xunit.core (2.3.1) + xunit.abstractions (2.0.1) + xunit.analyzers (0.8) + xunit.assert (2.3.1) + xunit.core (2.3.1) + xunit.extensibility.core (2.3.1) + xunit.extensibility.execution (2.3.1) + xunit.extensibility.core (2.3.1) + xunit.abstractions (>= 2.0.1) + xunit.extensibility.execution (2.3.1) + xunit.extensibility.core (2.3.1) + xunit.runner.console (2.3.1) + xunit.runner.visualstudio (2.3.1) - version_in_path: true diff --git a/samples/Argu.Samples.LS/App.config b/samples/Argu.Samples.LS/App.config new file mode 100644 index 00000000..4d96a325 --- /dev/null +++ b/samples/Argu.Samples.LS/App.config @@ -0,0 +1,20 @@ + + + + + + + True + + + + + True + + + + + + + + \ No newline at end of file diff --git a/samples/Argu.Samples.LS/Argu.Samples.LS.fsproj b/samples/Argu.Samples.LS/Argu.Samples.LS.fsproj index 00f60738..46ea30be 100644 --- a/samples/Argu.Samples.LS/Argu.Samples.LS.fsproj +++ b/samples/Argu.Samples.LS/Argu.Samples.LS.fsproj @@ -9,7 +9,7 @@ Exe Argu.Samples.LS ls - v4.5 + v4.6.1 true 4.4.0.0 Argu.Samples.LS @@ -20,7 +20,7 @@ full false false - ..\bin\ + ..\..\bin\Debug\net40\ DEBUG;TRACE 3 AnyCPU @@ -33,7 +33,7 @@ pdbonly true true - ..\bin\ + ..\..\bin\Release\net40\ TRACE 3 AnyCPU @@ -42,26 +42,6 @@ true --standalone - - - - False - - - - - - - - - - - - Argu - {49e38cf1-8b37-4a4f-83cf-eafe9577bcc6} - False - - 11 @@ -85,4 +65,32 @@ --> + + + + + + + + + + + + + Argu + {49e38cf1-8b37-4a4f-83cf-eafe9577bcc6} + False + + + + + + + ..\..\packages\testing\FSharp.Core\lib\net45\FSharp.Core.dll + True + True + + + + \ No newline at end of file diff --git a/samples/Argu.Samples.LS/paket.references b/samples/Argu.Samples.LS/paket.references new file mode 100644 index 00000000..d9d955b7 --- /dev/null +++ b/samples/Argu.Samples.LS/paket.references @@ -0,0 +1,2 @@ +group Testing +FSharp.Core \ No newline at end of file diff --git a/src/Argu.Core/Argu.Core.fsproj b/src/Argu.Core/Argu.Core.fsproj new file mode 100644 index 00000000..9d737240 --- /dev/null +++ b/src/Argu.Core/Argu.Core.fsproj @@ -0,0 +1,36 @@ + + + + netstandard2.0 + Argu + + + false + ..\..\bin\Debug\ + ..\..\bin\Debug\netstandard2.0\Argu.XML + + + RELEASE;NETSTANDARD2_0 + ..\..\bin\Release\ + ..\..\bin\Release\netstandard2.0\Argu.XML + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Argu/Argu.fsproj b/src/Argu/Argu.fsproj index f1f5235b..8c31f056 100644 --- a/src/Argu/Argu.fsproj +++ b/src/Argu/Argu.fsproj @@ -21,35 +21,24 @@ full false false - ..\..\bin\net40\ + ..\..\bin\Debug\net40\ DEBUG;TRACE 3 - ..\..\bin\net40\Argu.XML + ..\..\bin\Debug\net40\Argu.XML --warnon:1182 pdbonly true true - ..\..\bin\net40\ + ..\..\bin\Release\net40\ TRACE 3 - ..\..\bin\net40\Argu.XML + ..\..\bin\Release\net40\Argu.XML 11 - - pdbonly - true - true - v3.5 - 2.3.0.0 - TRACE;NET35 - 3 - ..\..\bin\net35\Argu.XML - ..\..\bin\net35\ - @@ -81,9 +70,6 @@ - - True - @@ -100,4 +86,15 @@ --> + + + + + ..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll + True + True + + + + \ No newline at end of file diff --git a/src/Argu/ArgumentParser.fs b/src/Argu/ArgumentParser.fs index 0edfbaf5..59d9db27 100644 --- a/src/Argu/ArgumentParser.fs +++ b/src/Argu/ArgumentParser.fs @@ -158,7 +158,14 @@ and [] let ignoreUnrecognized = defaultArg ignoreUnrecognized false let raiseOnUsage = defaultArg raiseOnUsage true let inputs = match inputs with None -> getEnvironmentCommandLineArgs () | Some args -> args - let configurationReader = match configurationReader with Some c -> c | None -> ConfigurationReader.DefaultReader() + let configurationReader = + match configurationReader with + | Some c -> c +#if NETSTANDARD2_0 + | None -> ConfigurationReader.NullReader +#else + | None -> ConfigurationReader.FromAppSettings() +#endif try let appSettingsResults = parseKeyValueConfig configurationReader argInfo @@ -169,35 +176,6 @@ and [] with ParserExn (errorCode, msg) -> errorHandler.Exit (msg, errorCode) - /// Parse AppSettings section of XML configuration only. - /// If specified, parse AppSettings configuration from given xml configuration file. - /// Ignore errors caused by the Mandatory attribute. Defaults to false. - [] - member __.ParseAppSettings (?xmlConfigurationFile : string, ?ignoreMissing : bool) : ParseResults<'Template> = - let configurationReader = - match xmlConfigurationFile with - | None -> ConfigurationReader.DefaultReader() - | Some f -> -#if CORE_CLR - raise <| NotImplementedException "App.Config is not supported." -#else - ConfigurationReader.FromAppSettingsFile(f) -#endif - - __.ParseConfiguration(configurationReader, ?ignoreMissing = ignoreMissing) - - /// Parse AppSettings section of XML configuration of given assembly. - /// assembly to get application configuration from. - /// Ignore errors caused by the Mandatory attribute. Defaults to false. - [] - member __.ParseAppSettings(assembly : Assembly, ?ignoreMissing : bool) = -#if CORE_CLR - raise <| NotImplementedException "App.Config is not supported." -#else - let configurationReader = ConfigurationReader.FromAppSettings(assembly) - __.ParseConfiguration(configurationReader, ?ignoreMissing = ignoreMissing) -#endif - /// /// Converts a sequence of template argument inputs into a ParseResults instance /// diff --git a/src/Argu/AssemblyInfo.fs b/src/Argu/AssemblyInfo.fs index a1b1dc56..0094c0bd 100644 --- a/src/Argu/AssemblyInfo.fs +++ b/src/Argu/AssemblyInfo.fs @@ -2,10 +2,10 @@ namespace System open System.Reflection -[] -[] +[] +[] do () module internal AssemblyVersionInformation = - let [] AssemblyVersion = "3.6.1" - let [] AssemblyFileVersion = "3.6.1" + let [] AssemblyVersion = "4.0.0" + let [] AssemblyFileVersion = "4.0.0" diff --git a/src/Argu/ConfigReaders.fs b/src/Argu/ConfigReaders.fs index 76c850f9..7ae453c9 100644 --- a/src/Argu/ConfigReaders.fs +++ b/src/Argu/ConfigReaders.fs @@ -2,36 +2,43 @@ open System open System.IO -open System.Collections.Generic - -#if !CORE_CLR open System.Configuration +open System.Collections.Generic open System.Reflection -// misc configuration reader implementations +/// Abstract key/value configuration reader +type IConfigurationReader = + /// Configuration reader identifier + abstract Name : string + /// Gets value corresponding to supplied key + abstract GetValue : key:string -> string -type private AppSettingsConfigurationReader () = +/// Configuration reader that never returns a value +type NullConfigurationReader() = interface IConfigurationReader with - member __.Name = "AppSettings configuration reader" - member __.GetValue(key:string) = ConfigurationManager.AppSettings.[key] + member x.Name = "Null Configuration Reader" + member x.GetValue _ = null + +/// Environment variable-based configuration reader +type EnvironmentVariableConfigurationReader() = + // order of environment variable target lookup + let targets = + [| EnvironmentVariableTarget.Process + EnvironmentVariableTarget.User + EnvironmentVariableTarget.Machine |] -type private AppSettingsConfigurationFileReader private (xmlPath : string, kv : KeyValueConfigurationCollection) = - member __.Path = xmlPath interface IConfigurationReader with - member __.Name = sprintf "App.config configuration reader: %s" xmlPath - member __.GetValue(key:string) = - match kv.[key] with - | null -> null - | entry -> entry.Value + member x.Name = "Environment Variables Configuration Reader" + member x.GetValue(key:string) = + let folder curr (target : EnvironmentVariableTarget) = + match curr with + | null -> Environment.GetEnvironmentVariable(key, target) + | value -> value - static member Create(path : string) = - if not <| File.Exists path then raise <| new FileNotFoundException(path) - let fileMap = new ExeConfigurationFileMap() - fileMap.ExeConfigFilename <- path - let config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None) - new AppSettingsConfigurationFileReader(path, config.AppSettings.Settings) + targets |> Array.fold folder null -type private DictionaryConfigurationReader (keyValueDictionary : IDictionary, ?name : string) = +/// Configuration reader dictionary proxy +type DictionaryConfigurationReader (keyValueDictionary : IDictionary, ?name : string) = let name = defaultArg name "Dictionary configuration reader." interface IConfigurationReader with member __.Name = name @@ -39,7 +46,8 @@ type private DictionaryConfigurationReader (keyValueDictionary : IDictionary string option, ?name : string) = +/// Function configuration reader proxy +type FunctionConfigurationReader (configFunc : string -> string option, ?name : string) = let name = defaultArg name "Function configuration reader." interface IConfigurationReader with member __.Name = name @@ -48,9 +56,50 @@ type private FunctionConfigurationReader (configFunc : string -> string option, | None -> null | Some v -> v +#if !NETSTANDARD2_0 +/// AppSettings XML configuration reader +type AppSettingsConfigurationReader () = + interface IConfigurationReader with + member __.Name = "AppSettings configuration reader" + member __.GetValue(key:string) = ConfigurationManager.AppSettings.[key] + +/// AppSettings XML configuration reader +type AppSettingsConfigurationFileReader private (xmlPath : string, kv : KeyValueConfigurationCollection) = + member __.Path = xmlPath + interface IConfigurationReader with + member __.Name = sprintf "App.config configuration reader: %s" xmlPath + member __.GetValue(key:string) = + match kv.[key] with + | null -> null + | entry -> entry.Value + + /// Create used supplied XML file path + static member Create(path : string) = + if not <| File.Exists path then raise <| new FileNotFoundException(path) + let fileMap = new ExeConfigurationFileMap() + fileMap.ExeConfigFilename <- path + let config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None) + new AppSettingsConfigurationFileReader(path, config.AppSettings.Settings) +#endif /// Configuration reader implementations type ConfigurationReader = + /// Create a configuration reader that always returns null + static member NullReader = new NullConfigurationReader() :> IConfigurationReader + + /// Create a configuration reader instance using an IDictionary instance + static member FromDictionary(keyValueDictionary : IDictionary, ?name : string) = + new DictionaryConfigurationReader(keyValueDictionary, ?name = name) :> IConfigurationReader + + /// Create a configuration reader instance using an F# function + static member FromFunction(reader : string -> string option, ?name : string) = + new FunctionConfigurationReader(reader, ?name = name) :> IConfigurationReader + + /// Create a configuration reader instance using environment variables + static member FromEnvironmentVariables() = + new EnvironmentVariableConfigurationReader() :> IConfigurationReader + +#if !NETSTANDARD2_0 /// Create a configuration reader instance using the application's resident AppSettings configuration static member FromAppSettings() = new AppSettingsConfigurationReader() :> IConfigurationReader /// Create a configuration reader instance using a local xml App.Config file @@ -63,21 +112,4 @@ type ConfigurationReader = |> invalidArg assembly.FullName AppSettingsConfigurationFileReader.Create(path + ".config") :> IConfigurationReader - - /// Create a configuration reader instance using an IDictionary instance - static member FromDictionary(keyValueDictionary : IDictionary, ?name : string) = - new DictionaryConfigurationReader(keyValueDictionary, ?name = name) :> IConfigurationReader - - /// Create a configuration reader instance using an F# function - static member FromFunction(reader : string -> string option, ?name : string) = - new FunctionConfigurationReader(reader, ?name = name) :> IConfigurationReader - - static member DefaultReader () = ConfigurationReader.FromAppSettings() -#else -/// Configuration reader implementations -type ConfigurationReader = - static member DefaultReader () = - { new IConfigurationReader with - member x.Name = "Default - Empty Configuration Reader" - member x.GetValue k = null } #endif \ No newline at end of file diff --git a/src/Argu/PreCompute.fs b/src/Argu/PreCompute.fs index d52fb6d0..30299168 100644 --- a/src/Argu/PreCompute.fs +++ b/src/Argu/PreCompute.fs @@ -48,11 +48,7 @@ let tryExtractUnionParameterLabel (p : PropertyInfo) = else Some(p.Name.Replace('_',' ')) let (|NestedParseResults|Optional|List|Other|) (t : Type) = -#if CORE_CLR - if t.GetTypeInfo().IsGenericType then -#else if t.IsGenericType then -#endif let gt = t.GetGenericTypeDefinition() if typeof.IsAssignableFrom t then NestedParseResults(t.GetGenericArguments().[0]) elif gt = typedefof<_ option> then Optional(t.GetGenericArguments().[0]) @@ -90,20 +86,14 @@ let primitiveParsers = mkParser "float" Single.Parse string mkParser "double" Double.Parse string mkParser "decimal" Decimal.Parse string -#if !NET35 mkParser "bigint" System.Numerics.BigInteger.Parse string -#endif mkParser "guid" Guid string mkParser "base64" Convert.FromBase64String Convert.ToBase64String |] /// Creates a primitive parser from an enumeration let tryGetEnumerationParser label (t : Type) = -#if CORE_CLR - if not (t.GetTypeInfo().IsEnum) then None else -#else if not t.IsEnum then None else -#endif let names = Enum.GetNames(t) |> Seq.map generateEnumName let values = Enum.GetValues(t) |> Seq.cast let index = Seq.zip names values |> Seq.toArray @@ -369,7 +359,7 @@ let rec private preComputeUnionCaseArgInfo (stack : Type list) (helpParam : Help match uci.TryGetAttribute () with | None -> Some <| generateAppSettingsName uci | Some _ when parsers.Type = ArgumentType.SubCommand -> arguExn "CustomAppSettings in %O not supported in subcommands." uci - | Some attr when not <| isNullOrWhiteSpace attr.Name -> Some attr.Name + | Some attr when not <| String.IsNullOrWhiteSpace attr.Name -> Some attr.Name | Some attr -> arguExn "AppSettings parameter '%s' contains invalid characters." attr.Name /// gets the default name of the argument @@ -452,11 +442,7 @@ and private preComputeUnionArgInfoInner (stack : Type list) (helpParam : HelpPar arguExn "template type '%O' is not an F# union." t elif stack |> List.exists ((=) t) then arguExn "template type '%O' implements unsupported recursive pattern." t -#if CORE_CLR - elif t.GetTypeInfo().IsGenericType then -#else elif t.IsGenericType then -#endif arguExn "template type '%O' is generic; this is not supported." t let helpParam = diff --git a/src/Argu/Types.fs b/src/Argu/Types.fs index 8083b12e..12b6353e 100644 --- a/src/Argu/Types.fs +++ b/src/Argu/Types.fs @@ -87,13 +87,6 @@ type ProcessExiter(colorizerOption : (ErrorCode -> ConsoleColor option) option) exit (int errorCode) -/// Abstract key/value configuration reader -type IConfigurationReader = - /// Configuration reader identifier - abstract Name : string - /// Gets value corresponding to supplied key - abstract GetValue : key:string -> string - /// Argument parameter type identifier type ArgumentType = /// Argument specifies primitive parameters like strings or integers diff --git a/src/Argu/UnionArgInfo.fs b/src/Argu/UnionArgInfo.fs index ffd6384c..a3ea8794 100644 --- a/src/Argu/UnionArgInfo.fs +++ b/src/Argu/UnionArgInfo.fs @@ -3,9 +3,6 @@ module internal Argu.UnionArgInfo open System open System.IO -#if !CORE_CLR -open System.Configuration -#endif open System.Collections.Generic open System.Reflection diff --git a/src/Argu/Utils.fs b/src/Argu/Utils.fs index 3a165e89..1b933e5b 100644 --- a/src/Argu/Utils.fs +++ b/src/Argu/Utils.fs @@ -12,11 +12,7 @@ open FSharp.Reflection open FSharp.Quotations open FSharp.Quotations.Patterns -#if NETSTANDARD1_6 -let allBindings = true -#else let allBindings = BindingFlags.NonPublic ||| BindingFlags.Public ||| BindingFlags.Static ||| BindingFlags.Instance -#endif let inline arguExn fmt = Printf.ksprintf(fun msg -> raise <| new ArguException(msg)) fmt @@ -127,30 +123,13 @@ type MemberInfo with | [||] -> None | attrs -> attrs |> Array.last :?> 'T |> Some -#if CORE_CLR -type Type with - member x.GetCustomAttributes(t, b : bool) = x.GetTypeInfo().GetCustomAttributes(t, b) - - member m.ContainsAttribute<'T when 'T :> Attribute> () : bool= - m.GetTypeInfo().ContainsAttribute<'T>() - - member m.TryGetAttribute<'T when 'T :> Attribute> () : 'T option = - m.GetTypeInfo().TryGetAttribute<'T>() -#endif - type IDictionary<'K,'V> with member d.TryFind k = let ok,found = d.TryGetValue k if ok then Some found else None - -#if !CORE_CLR let currentProgramName = lazy(System.Diagnostics.Process.GetCurrentProcess().MainModule.ModuleName) -#else -// error FS0039: The value, constructor, namespace or type 'Process' is not defined -let currentProgramName = lazy("wtf") -#endif type UnionCaseInfo with member uci.GetAttributes<'T when 'T :> Attribute> (?includeDeclaringTypeAttrs : bool) = @@ -213,16 +192,6 @@ let escapeCliString (value : string) = let flattenCliTokens (tokens : seq) = tokens |> Seq.map escapeCliString |> String.concat " " -let private whitespaceAllRegex = new Regex(@"^\s*$", RegexOptions.Compiled) -/// Replacement of String.IsNullOrWhiteSpace for NET35 -let isNullOrWhiteSpace (string:string) = -#if NET35 - if string = null then true - else whitespaceAllRegex.IsMatch string -#else - String.IsNullOrWhiteSpace string -#endif - type StringExpr<'T> = StringBuilder -> 'T type StringExprBuilder () = diff --git a/src/Argu/paket.references b/src/Argu/paket.references index 5f282702..3a01785e 100644 --- a/src/Argu/paket.references +++ b/src/Argu/paket.references @@ -1 +1 @@ - \ No newline at end of file +FSharp.Core \ No newline at end of file diff --git a/src/Argu/paket.template b/src/Argu/paket.template index 6ab55dbb..a99d38bd 100644 --- a/src/Argu/paket.template +++ b/src/Argu/paket.template @@ -17,9 +17,9 @@ tags references Argu.dll files - ../../bin/net40/Argu.dll ==> lib/net40 - ../../bin/net40/Argu.pdb ==> lib/net40 - ../../bin/net40/Argu.xml ==> lib/net40 - ../../bin/net35/Argu.dll ==> lib/net35 - ../../bin/net35/Argu.pdb ==> lib/net35 - ../../bin/net35/Argu.xml ==> lib/net35 + ../../bin/Release/net40/Argu.dll ==> lib/net40 + ../../bin/Release/net40/Argu.pdb ==> lib/net40 + ../../bin/Release/net40/Argu.xml ==> lib/net40 + ../../bin/Release/netstandard2.0/Argu.dll ==> lib/netstandard2.0 + ../../bin/Release/netstandard2.0/Argu.pdb ==> lib/netstandard2.0 + ../../bin/Release/netstandard2.0/Argu.xml ==> lib/netstandard2.0 \ No newline at end of file diff --git a/src/Argu/project.json b/src/Argu/project.json deleted file mode 100644 index 52420cd1..00000000 --- a/src/Argu/project.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": "3.6.1", - "buildOptions": { - "debugType": "portable", - "compilerName": "fsc", - "define": [ - "CORE_CLR" - ], - "compile": { - "includeFiles": [ - "AssemblyInfo.fs", - "Types.fs", - "Attributes.fs", - "Utils.fs", - "ConfigReaders.fs", - "UnionArgInfo.fs", - "PreCompute.fs", - "UnParsers.fs", - "ParseResults.fs", - "Parsers/Common.fs", - "Parsers/Cli.fs", - "Parsers/KeyValue.fs", - "ArgumentParser.fs" - ] - } - }, - "tools": { - "dotnet-mergenupkg": "1.0.*", - "dotnet-compile-fsc": { - "version": "1.0.0-preview2-*", - "imports": "dnxcore50" - } - }, - "frameworks": { - "netstandard1.6": { - "buildOptions": { - "define": [ - "NETSTANDARD1_5", - "NETSTANDARD1_6" - ] - }, - "dependencies": { - "System.Xml.XDocument": "4.0.11", - "FSharp.Core": "4.0.1.7-alpha", - "NETStandard.Library": "1.6.0" - } - } - } -} \ No newline at end of file diff --git a/tests/Argu.Core.Tests/App.config b/tests/Argu.Core.Tests/App.config new file mode 100644 index 00000000..66529869 --- /dev/null +++ b/tests/Argu.Core.Tests/App.config @@ -0,0 +1,134 @@ + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + diff --git a/tests/Argu.Core.Tests/Argu.Core.Tests.fsproj b/tests/Argu.Core.Tests/Argu.Core.Tests.fsproj new file mode 100644 index 00000000..8f787fcc --- /dev/null +++ b/tests/Argu.Core.Tests/Argu.Core.Tests.fsproj @@ -0,0 +1,32 @@ + + + + netcoreapp2.0 + Library + Argu.Tests + + + TRACE;RELEASE;NETCOREAPP2_0 + ..\..\bin\Release\ + + + NETCOREAPP2_0 + ..\..\bin\Debug\ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/Argu.Core.Tests/Main.fs b/tests/Argu.Core.Tests/Main.fs new file mode 100644 index 00000000..e78d6ae4 --- /dev/null +++ b/tests/Argu.Core.Tests/Main.fs @@ -0,0 +1,6 @@ +module Argu.Tests.Main + +// placeholder main function to account for xunit.visualstudio.runner +// not currently functioning with netstandard libraries +[] +let main _ = 0 \ No newline at end of file diff --git a/tests/Argu.Tests/App.config b/tests/Argu.Tests/App.config index 032977e2..b9c9a574 100644 --- a/tests/Argu.Tests/App.config +++ b/tests/Argu.Tests/App.config @@ -1,14 +1,40 @@  - + - - - + + + + + True + + + True - + + + + True + + + + + True + + + + + True + + + + + True + + - \ No newline at end of file + + \ No newline at end of file diff --git a/tests/Argu.Tests/Argu.Tests.fsproj b/tests/Argu.Tests/Argu.Tests.fsproj index 1797f3ae..f55c881f 100644 --- a/tests/Argu.Tests/Argu.Tests.fsproj +++ b/tests/Argu.Tests/Argu.Tests.fsproj @@ -1,5 +1,6 @@  + Debug @@ -9,7 +10,7 @@ Library Argu.Tests Argu.Tests - v4.5 + v4.6.1 4.4.0.0 true Argu.Tests @@ -21,19 +22,19 @@ full false false - ..\..\bin\net40\ + ..\..\bin\Debug\net40 DEBUG;TRACE 3 - ..\..\bin\net40\Argu.Tests.XML + ..\..\bin\Debug\net40\Argu.Tests.XML pdbonly true true - ..\..\bin\net40\ + ..\..\bin\Release\net40 TRACE 3 - ..\..\bin\net40\Argu.Tests.XML + ..\..\bin\Release\net40\Argu.Tests.XML 11 @@ -52,54 +53,13 @@ - + <__paket__xunit_runner_visualstudio_props>net20\xunit.runner.visualstudio - - - <__paket__xunit_runner_visualstudio_props>portable-net45+win8+wp8+wpa81\xunit.runner.visualstudio - - - - - <__paket__xunit_runner_visualstudio_props>uap10.0\xunit.runner.visualstudio - <__paket__xunit_runner_visualstudio_targets>uap10.0\xunit.runner.visualstudio - - - - - <__paket__xunit_runner_visualstudio_props>win81\xunit.runner.visualstudio - <__paket__xunit_runner_visualstudio_targets>win81\xunit.runner.visualstudio - - - - - <__paket__xunit_runner_visualstudio_props>wpa81\xunit.runner.visualstudio - <__paket__xunit_runner_visualstudio_targets>wpa81\xunit.runner.visualstudio - - - - - - - <__paket__xunit_core_props>portable-net45+win8+wp8+wpa81\xunit.core - - - - - <__paket__xunit_core_props>win81\xunit.core - - - - - <__paket__xunit_core_props>wpa81\xunit.core - - - - +