From c7f5ba1130b84432bc4df77e9791619ccd0b00e8 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Fri, 4 Nov 2016 16:26:53 +0100 Subject: [PATCH 1/6] add preview3 fsproj --- src/Paket.Core/Paket.Core.preview3.fsproj | 160 ++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 src/Paket.Core/Paket.Core.preview3.fsproj diff --git a/src/Paket.Core/Paket.Core.preview3.fsproj b/src/Paket.Core/Paket.Core.preview3.fsproj new file mode 100644 index 0000000000..cda5f75289 --- /dev/null +++ b/src/Paket.Core/Paket.Core.preview3.fsproj @@ -0,0 +1,160 @@ + + + + + netstandard1.6 + + + + 1.0.0-preview3 + Enrico Sada + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6.0 + + + + 1.0.0-alpha-161023 + + + 1.0.0-alpha-20161029-1 + All + + + 1.0.0-alpha-000001 + All + + + + + + 1.6.0 + + + 9.0.1 + + + 0.10.0-beta1-v2 + + + 0.6.0 + + + 4.0.1 + + + 4.0.11 + + + 4.0.0 + + + 4.0.1 + + + 4.1.0 + + + 4.0.11 + + + 4.0.1 + + + 4.0.0 + + + 4.2.0 + + + 4.0.0 + + + + + + $(DefineConstants);DOTNETCORE;NETSTANDARD1_5;NETSTANDARD1_6;USE_HTTP_CLIENT + + + + + 1.0.0-preview2-020000 + + + + + + From d7222b43e366a8e7fba2bafe727f5bc66787269d Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Fri, 4 Nov 2016 16:48:02 +0100 Subject: [PATCH 2/6] add (but doesnt buid) Paket console app --- src/Paket/Paket.preview3.fsproj | 65 +++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/Paket/Paket.preview3.fsproj diff --git a/src/Paket/Paket.preview3.fsproj b/src/Paket/Paket.preview3.fsproj new file mode 100644 index 0000000000..2df9aaa5f3 --- /dev/null +++ b/src/Paket/Paket.preview3.fsproj @@ -0,0 +1,65 @@ + + + + + Exe + netcoreapp1.0 + + + + 1.0.0-preview3 + Enrico Sada + + + + + + + + + + + + + + + + 1.0.1 + + + + 1.0.0-alpha-161023 + + + 1.0.0-alpha-20161029-1 + All + + + 1.0.0-alpha-000001 + All + + + + + + Paket.Core.preview3 + + + 0.6.0 + + + 3.3.0 + + + + + + 1.0.0-preview2-020000 + + + + + + From 59063e9bd59babad35607d77a854c35d9855e1b5 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Fri, 4 Nov 2016 16:57:56 +0100 Subject: [PATCH 3/6] fix build error --- src/Paket.Core/Paket.Core.preview3.fsproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Paket.Core/Paket.Core.preview3.fsproj b/src/Paket.Core/Paket.Core.preview3.fsproj index cda5f75289..ba5d75fe09 100644 --- a/src/Paket.Core/Paket.Core.preview3.fsproj +++ b/src/Paket.Core/Paket.Core.preview3.fsproj @@ -48,6 +48,7 @@ + @@ -57,7 +58,6 @@ - From fecd914f492a7f829ad947969a690c45e1433557 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Fri, 4 Nov 2016 16:58:50 +0100 Subject: [PATCH 4/6] fix preview2 project.json --- src/Paket.Core/Paket.Core/project.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Paket.Core/Paket.Core/project.json b/src/Paket.Core/Paket.Core/project.json index cf1f9d438e..719b48c1c3 100644 --- a/src/Paket.Core/Paket.Core/project.json +++ b/src/Paket.Core/Paket.Core/project.json @@ -47,6 +47,7 @@ "../DependenciesFileParser.fs", "../LockFile.fs", "../TemplateFile.fs", + "../PackagesConfigFile.fs", "../ProjectFile.fs", "../DependenciesFile.fs", "../LocalFile.fs", @@ -56,7 +57,6 @@ "../BindingRedirects.fs", "../NupkgWriter.fs", "../ProcessOptions.fs", - "../PackagesConfigFile.fs", "../DependencyModel.fs", "../InstallProcess.fs", "../UpdateProcess.fs", From 22ea7c27ac9335944c6a111b82a2044612f67b31 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Fri, 4 Nov 2016 17:03:14 +0100 Subject: [PATCH 5/6] cleanup --- src/Paket.Core/Paket.Core.preview3.fsproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Paket.Core/Paket.Core.preview3.fsproj b/src/Paket.Core/Paket.Core.preview3.fsproj index ba5d75fe09..63d1eb9692 100644 --- a/src/Paket.Core/Paket.Core.preview3.fsproj +++ b/src/Paket.Core/Paket.Core.preview3.fsproj @@ -145,7 +145,6 @@ - $(DefineConstants);DOTNETCORE;NETSTANDARD1_5;NETSTANDARD1_6;USE_HTTP_CLIENT From 598bbffd71bd3231bc697cd2f143b5944ed84deb Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Fri, 4 Nov 2016 17:22:37 +0100 Subject: [PATCH 6/6] fix e workarounds. Paket now work as console app --- src/Paket.Core/Paket.Core.preview3.fsproj | 1 + src/Paket.Core/Paket.Core/project.json | 1 + src/Paket/Program.fs | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/src/Paket.Core/Paket.Core.preview3.fsproj b/src/Paket.Core/Paket.Core.preview3.fsproj index 63d1eb9692..e5cfcc6935 100644 --- a/src/Paket.Core/Paket.Core.preview3.fsproj +++ b/src/Paket.Core/Paket.Core.preview3.fsproj @@ -72,6 +72,7 @@ + diff --git a/src/Paket.Core/Paket.Core/project.json b/src/Paket.Core/Paket.Core/project.json index 719b48c1c3..84cbfbe9e2 100644 --- a/src/Paket.Core/Paket.Core/project.json +++ b/src/Paket.Core/Paket.Core/project.json @@ -71,6 +71,7 @@ "../NugetConvert.fs", "../FindOutdated.fs", "../FindReferences.fs", + "../Why.fs", "../PublicAPI.fs", "../ScriptGeneration.fs" ] diff --git a/src/Paket/Program.fs b/src/Paket/Program.fs index c55d052b1a..0ab66c6440 100644 --- a/src/Paket/Program.fs +++ b/src/Paket/Program.fs @@ -27,7 +27,11 @@ let processWithValidation silent validateF commandF (result : ParseResults<'T>) traceError "Command was:" traceError (" " + String.Join(" ",Environment.GetCommandLineArgs())) result.Parser.PrintUsage() |> traceError +#if NETCOREAPP1_0 + // Environment.ExitCode not supported in netcoreapp1.0 +#else Environment.ExitCode <- 1 +#endif else commandF result let elapsedTime = Utils.TimeSpanToReadableString stopWatch.Elapsed @@ -207,7 +211,11 @@ let pack (results : ParseResults<_>) = ?releaseNotes = results.TryGetResult <@ PackArgs.ReleaseNotes @>, ?templateFile = results.TryGetResult <@ PackArgs.TemplateFile @>, excludedTemplates = results.GetResults <@ PackArgs.ExcludedTemplate @>, +#if NETCOREAPP1_0 + workingDir = System.IO.Directory.GetCurrentDirectory(), +#else workingDir = Environment.CurrentDirectory, +#endif lockDependencies = results.Contains <@ PackArgs.LockDependencies @>, minimumFromLockFile = results.Contains <@ PackArgs.LockDependenciesToMinimum @>, pinProjectReferences = results.Contains <@ PackArgs.PinProjectReferences @>, @@ -317,11 +325,17 @@ let generateIncludeScripts (results : ParseResults) let environmentFramework = lazy ( // HACK: resolve .net version based on environment // list of match is incomplete / inaccurate +#if NETCOREAPP1_0 + // Environment.Version is not supported + //dunno what is used for, using a default + DotNetFramework (FrameworkVersion.V4_5) +#else let version = Environment.Version match version.Major, version.Minor, version.Build, version.Revision with | 4, 0, 30319, 42000 -> DotNetFramework (FrameworkVersion.V4_6) | 4, 0, 30319, _ -> DotNetFramework (FrameworkVersion.V4_5) | _ -> DotNetFramework (FrameworkVersion.V4_5) // paket.exe is compiled for framework 4.5 +#endif ) let tupleMap f v = (v, f v) let failOnMismatch toParse parsed f message = @@ -436,7 +450,11 @@ let main() = with | exn when not (exn :? System.NullReferenceException) -> +#if NETCOREAPP1_0 + // Environment.ExitCode not supported +#else Environment.ExitCode <- 1 +#endif traceErrorfn "Paket failed with:%s\t%s" Environment.NewLine exn.Message if verbose then