diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 8e8726806..f32890dc8 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,10 @@ +## 11.0.1 +* update to Ionide.ProjInfo +* use computed args for references in API doc generation +* Fix #616 +* Fix #662 +* Fix #646 + ## 10.1.1 * Switch to cleaner default styling based on DiffSharp styles * Change `fsdocs-menu` to `fsdocs-nav` diff --git a/paket.dependencies b/paket.dependencies index fd4963c48..926e43068 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -10,8 +10,8 @@ nuget CommandLineParser ~> 2.8 nuget Microsoft.Build.Framework nuget Microsoft.Build.Tasks.Core nuget Microsoft.Build.Utilities.Core -nuget Dotnet.ProjInfo -nuget Dotnet.ProjInfo.Workspace +nuget Ionide.ProjInfo +nuget Ionide.ProjInfo.Sln nuget Newtonsoft.Json nuget Suave nuget System.Memory diff --git a/paket.lock b/paket.lock index 9da42f5d0..adc19d74e 100644 --- a/paket.lock +++ b/paket.lock @@ -3,15 +3,6 @@ RESTRICTION: || (== netcoreapp3.1) (== netstandard2.1) NUGET remote: https://api.nuget.org/v3/index.json CommandLineParser (2.8) - Dotnet.ProjInfo (0.44) - FSharp.Core (>= 4.6.2) - Microsoft.NETFramework.ReferenceAssemblies (>= 1.0) - System.ValueTuple (>= 4.4) - Dotnet.ProjInfo.Workspace (0.44) - Dotnet.ProjInfo (>= 0.44) - FSharp.Core (>= 4.6.2) - Microsoft.NETFramework.ReferenceAssemblies (>= 1.0) - Sln (>= 0.3) FSharp.Compiler.Service (39.0) FSharp.Core (5.0.1) Microsoft.Build.Framework (>= 16.6) @@ -45,14 +36,31 @@ NUGET FSharp.Core (>= 4.2.3) NETStandard.Library (>= 2.0.3) NUnit (>= 3.12 < 4.0) - Microsoft.Build.Framework (16.8) + Ionide.ProjInfo (0.51) + FSharp.Core (>= 5.0.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.1)) + Ionide.ProjInfo.Sln (>= 0.51) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.1)) + Microsoft.Build (>= 16.8) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.1)) + Microsoft.Build.Locator (>= 1.4.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.1)) + Ionide.ProjInfo.Sln (0.51) + Microsoft.Build (16.9) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.1)) + Microsoft.Build.Framework (>= 16.9) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= netcoreapp2.1)) + Microsoft.Win32.Registry (>= 4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) + System.Collections.Immutable (>= 5.0) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= netcoreapp2.1)) + System.Memory (>= 4.5.4) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= netcoreapp2.1)) + System.Reflection.Metadata (>= 1.6) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) + System.Security.Principal.Windows (>= 4.7) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) + System.Text.Encoding.CodePages (>= 4.0.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) + System.Text.Json (>= 4.7) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= netcoreapp2.1)) + System.Threading.Tasks.Dataflow (>= 4.9) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= netcoreapp2.1)) + Microsoft.Build.Framework (16.9) System.Security.Permissions (>= 4.7) - Microsoft.Build.Tasks.Core (16.8) - Microsoft.Build.Framework (>= 16.8) - Microsoft.Build.Utilities.Core (>= 16.8) + Microsoft.Build.Locator (1.4.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.1)) + Microsoft.Build.Tasks.Core (16.9) + Microsoft.Build.Framework (>= 16.9) + Microsoft.Build.Utilities.Core (>= 16.9) Microsoft.Win32.Registry (>= 4.3) System.CodeDom (>= 4.4) - System.Collections.Immutable (>= 1.5) + System.Collections.Immutable (>= 5.0) System.Reflection.Metadata (>= 1.6) System.Reflection.TypeExtensions (>= 4.1) System.Resources.Extensions (>= 4.6) @@ -61,24 +69,24 @@ NUGET System.Security.Cryptography.Xml (>= 4.7) System.Security.Permissions (>= 4.7) System.Threading.Tasks.Dataflow (>= 4.9) - Microsoft.Build.Utilities.Core (16.8) - Microsoft.Build.Framework (>= 16.8) + Microsoft.Build.Utilities.Core (16.9) + Microsoft.Build.Framework (>= 16.9) Microsoft.Win32.Registry (>= 4.3) - System.Collections.Immutable (>= 1.5) + System.Collections.Immutable (>= 5.0) System.Security.Permissions (>= 4.7) System.Text.Encoding.CodePages (>= 4.0.1) Microsoft.CodeAnalysis.Analyzers (3.3.2) - Microsoft.CodeAnalysis.Common (3.8) + Microsoft.CodeAnalysis.Common (3.9) Microsoft.CodeAnalysis.Analyzers (>= 3.0) System.Collections.Immutable (>= 5.0) System.Memory (>= 4.5.4) System.Reflection.Metadata (>= 5.0) - System.Runtime.CompilerServices.Unsafe (>= 4.7.1) + System.Runtime.CompilerServices.Unsafe (>= 5.0) System.Text.Encoding.CodePages (>= 4.5.1) System.Threading.Tasks.Extensions (>= 4.5.4) - Microsoft.CodeAnalysis.CSharp (3.8) - Microsoft.CodeAnalysis.Common (3.8) - Microsoft.CodeCoverage (16.8.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= net45)) (&& (== netstandard2.1) (>= netcoreapp2.1)) + Microsoft.CodeAnalysis.CSharp (3.9) + Microsoft.CodeAnalysis.Common (3.9) + Microsoft.CodeCoverage (16.9.4) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= net45)) (&& (== netstandard2.1) (>= netcoreapp1.0)) Microsoft.DotNet.InternalAbstractions (1.0) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) System.AppContext (>= 4.1) System.Collections (>= 4.0.11) @@ -88,19 +96,17 @@ NUGET System.Runtime.Extensions (>= 4.1) System.Runtime.InteropServices (>= 4.1) System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - Microsoft.NET.Test.Sdk (16.8.3) - Microsoft.CodeCoverage (>= 16.8.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= net45)) (&& (== netstandard2.1) (>= netcoreapp2.1)) - Microsoft.TestPlatform.TestHost (>= 16.8.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) - Microsoft.NETCore.Platforms (5.0.1) + Microsoft.NET.Test.Sdk (16.9.4) + Microsoft.CodeCoverage (>= 16.9.4) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= net45)) (&& (== netstandard2.1) (>= netcoreapp1.0)) + Microsoft.TestPlatform.TestHost (>= 16.9.4) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp1.0)) + Microsoft.NETCore.Platforms (5.0.2) Microsoft.NETCore.Targets (5.0) - Microsoft.NETFramework.ReferenceAssemblies (1.0) - Microsoft.TestPlatform.ObjectModel (16.8.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) + Microsoft.TestPlatform.ObjectModel (16.9.4) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp1.0)) NuGet.Frameworks (>= 5.0) System.Reflection.Metadata (>= 1.6) - System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - Microsoft.TestPlatform.TestHost (16.8.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) - Microsoft.TestPlatform.ObjectModel (>= 16.8.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) (&& (== netstandard2.1) (>= uap10.0)) - Newtonsoft.Json (>= 9.0.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) (&& (== netstandard2.1) (>= uap10.0)) + Microsoft.TestPlatform.TestHost (16.9.4) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp1.0)) + Microsoft.TestPlatform.ObjectModel (>= 16.9.4) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp1.0)) (&& (== netstandard2.1) (>= uap10.0)) + Newtonsoft.Json (>= 9.0.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp1.0)) (&& (== netstandard2.1) (>= uap10.0)) Microsoft.Win32.Primitives (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) @@ -114,8 +120,8 @@ NUGET Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.0)) NETStandard.Library (2.0.3) Microsoft.NETCore.Platforms (>= 1.1) - Newtonsoft.Json (12.0.3) - NuGet.Frameworks (5.8.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) + Newtonsoft.Json (13.0.1) + NuGet.Frameworks (5.9) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp1.0)) NUnit (3.13.1) NETStandard.Library (>= 2.0) NUnit3TestAdapter (3.17) @@ -171,7 +177,6 @@ NUGET runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - Sln (0.3) Suave (2.6) FSharp.Core System.AppContext (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) @@ -280,7 +285,7 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - System.Drawing.Common (5.0.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.0)) + System.Drawing.Common (5.0.2) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.0)) Microsoft.Win32.SystemEvents (>= 5.0) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.0)) System.Formats.Asn1 (5.0) System.Buffers (>= 4.5.1) - restriction: || (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.1) @@ -623,6 +628,10 @@ NUGET Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) System.Text.Encoding (>= 4.3) + System.Text.Encodings.Web (5.0.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.1)) + System.Text.Json (5.0.2) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.1)) + System.Runtime.CompilerServices.Unsafe (>= 5.0) + System.Text.Encodings.Web (>= 5.0.1) System.Text.RegularExpressions (4.3.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) (&& (== netstandard2.1) (>= netcoreapp5.0)) System.Runtime (>= 4.3.1) System.Threading (4.3) @@ -649,7 +658,6 @@ NUGET System.Threading.ThreadPool (4.3) System.Runtime (>= 4.3) System.Runtime.Handles (>= 4.3) - System.ValueTuple (4.5) System.Windows.Extensions (5.0) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.0)) System.Drawing.Common (>= 5.0) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp3.0)) System.Xml.ReaderWriter (4.3.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.1) (>= netcoreapp2.1)) @@ -709,152 +717,152 @@ NUGET FSharp.Core (>= 4.0.0.1) - restriction: >= net45 FSharp.Core (>= 4.2.3) - restriction: && (< net45) (>= netstandard2.0) Microsoft.Win32.Registry (>= 4.7) - restriction: && (< net45) (>= netstandard2.0) - Fake.Core.CommandLineParsing (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.CommandLineParsing (5.20.4) - restriction: >= netstandard2.0 FParsec (>= 1.1.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.Context (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Context (5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.Environment (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Environment (5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.FakeVar (5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Context (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.Core.FakeVar (5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Context (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.Process (5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Environment (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.FakeVar (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Process (5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Environment (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.FakeVar (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 1.7.1) - restriction: >= netstandard2.0 - Fake.Core.ReleaseNotes (5.20.3) - Fake.Core.SemVer (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.Core.ReleaseNotes (5.20.4) + Fake.Core.SemVer (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.SemVer (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.SemVer (5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.String (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.String (5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.Target (5.20.3) - Fake.Core.CommandLineParsing (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Context (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Environment (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.FakeVar (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Target (5.20.4) + Fake.Core.CommandLineParsing (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Context (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Environment (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.FakeVar (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Process (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Control.Reactive (>= 4.4.2) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.Tasks (5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Tasks (5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.Trace (5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Environment (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.FakeVar (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Trace (5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Environment (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.FakeVar (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.Xml (5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Xml (5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.DotNet.AssemblyInfoFile (5.20.3) - Fake.Core.Environment (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.DotNet.AssemblyInfoFile (5.20.4) + Fake.Core.Environment (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.DotNet.Cli (5.20.3) - Fake.Core.Environment (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.DotNet.MSBuild (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.DotNet.NuGet (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.DotNet.Cli (5.20.4) + Fake.Core.Environment (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Process (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.DotNet.MSBuild (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.DotNet.NuGet (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 Mono.Posix.NETStandard (>= 1.0) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 12.0.3) - restriction: >= netstandard2.0 - Fake.DotNet.MSBuild (5.20.3) + Fake.DotNet.MSBuild (5.20.4) BlackFox.VsWhere (>= 1.1) - restriction: >= netstandard2.0 - Fake.Core.Environment (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Environment (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Process (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 MSBuild.StructuredLogger (>= 2.1.176) - restriction: >= netstandard2.0 - Fake.DotNet.NuGet (5.20.3) - Fake.Core.Environment (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.SemVer (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Tasks (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Xml (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Net.Http (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.DotNet.NuGet (5.20.4) + Fake.Core.Environment (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Process (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.SemVer (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Tasks (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Xml (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Net.Http (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 12.0.3) - restriction: >= netstandard2.0 NuGet.Protocol (>= 5.6) - restriction: >= netstandard2.0 - Fake.DotNet.Paket (5.20.3) - Fake.Core.Process (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.DotNet.Cli (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.DotNet.Paket (5.20.4) + Fake.Core.Process (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.DotNet.Cli (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.DotNet.Testing.NUnit (5.20.3) - Fake.Core.Environment (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Testing.Common (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.DotNet.Testing.NUnit (5.20.4) + Fake.Core.Environment (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Process (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Testing.Common (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Net.Http (5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.Net.Http (5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Testing.Common (5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.Testing.Common (5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Tools.Git (5.20.3) - Fake.Core.Environment (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.SemVer (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 5.20.3) - restriction: >= netstandard2.0 + Fake.Tools.Git (5.20.4) + Fake.Core.Environment (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Process (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.SemVer (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.String (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 5.20.4) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (>= 5.20.4) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 FParsec (1.1.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.3.4) - restriction: || (>= net45) (>= netstandard2.0) System.ValueTuple (>= 4.4) - restriction: >= net45 - FSharp.Control.Reactive (4.5) - restriction: >= netstandard2.0 - FSharp.Core (>= 4.7.2) - restriction: || (>= net46) (>= netstandard2.0) - System.Reactive (>= 4.4.1) - restriction: || (>= net46) (>= netstandard2.0) + FSharp.Control.Reactive (5.0.2) - restriction: >= netstandard2.0 + FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 + System.Reactive (>= 5.0) - restriction: >= netstandard2.0 FSharp.Core (4.7.2) Microsoft.Bcl.AsyncInterfaces (5.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.1)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Build (16.8) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 16.8) - restriction: || (>= net472) (>= netcoreapp2.1) + Microsoft.Build (16.9) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 16.9) - restriction: || (>= net472) (>= netcoreapp2.1) Microsoft.VisualStudio.Setup.Configuration.Interop (>= 1.16.30) - restriction: >= net472 Microsoft.Win32.Registry (>= 4.3) - restriction: >= netcoreapp2.1 - System.Collections.Immutable (>= 1.5) - restriction: || (>= net472) (>= netcoreapp2.1) - System.Memory (>= 4.5.3) - restriction: || (>= net472) (>= netcoreapp2.1) + System.Collections.Immutable (>= 5.0) - restriction: || (>= net472) (>= netcoreapp2.1) + System.Memory (>= 4.5.4) - restriction: || (>= net472) (>= netcoreapp2.1) System.Reflection.Metadata (>= 1.6) - restriction: >= netcoreapp2.1 System.Security.Principal.Windows (>= 4.7) - restriction: >= netcoreapp2.1 System.Text.Encoding.CodePages (>= 4.0.1) - restriction: >= netcoreapp2.1 System.Text.Json (>= 4.7) - restriction: || (>= net472) (>= netcoreapp2.1) System.Threading.Tasks.Dataflow (>= 4.9) - restriction: || (>= net472) (>= netcoreapp2.1) - Microsoft.Build.Framework (16.8) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (16.9) - restriction: >= netstandard2.0 System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) - Microsoft.Build.Tasks.Core (16.8) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 16.8) - restriction: >= netstandard2.0 - Microsoft.Build.Utilities.Core (>= 16.8) - restriction: >= netstandard2.0 + Microsoft.Build.Tasks.Core (16.9) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 16.9) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (>= 16.9) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 1.16.30) - restriction: >= net472 Microsoft.Win32.Registry (>= 4.3) - restriction: && (< net472) (>= netstandard2.0) System.CodeDom (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - System.Collections.Immutable (>= 1.5) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 5.0) - restriction: >= netstandard2.0 System.Reflection.Metadata (>= 1.6) - restriction: && (< net472) (>= netstandard2.0) System.Reflection.TypeExtensions (>= 4.1) - restriction: && (< net472) (>= netstandard2.0) System.Resources.Extensions (>= 4.6) - restriction: >= netstandard2.0 @@ -863,14 +871,14 @@ NUGET System.Security.Cryptography.Xml (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) System.Threading.Tasks.Dataflow (>= 4.9) - restriction: >= netstandard2.0 - Microsoft.Build.Utilities.Core (16.8) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 16.8) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (16.9) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 16.9) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 1.16.30) - restriction: >= net472 Microsoft.Win32.Registry (>= 4.3) - restriction: && (< net472) (>= netstandard2.0) - System.Collections.Immutable (>= 1.5) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 5.0) - restriction: >= netstandard2.0 System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) System.Text.Encoding.CodePages (>= 4.0.1) - restriction: && (< net472) (>= netstandard2.0) - Microsoft.NETCore.Platforms (5.0.1) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.1)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= netcoreapp1.1) (>= netstandard2.0)) (>= netcoreapp2.0) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) + Microsoft.NETCore.Platforms (5.0.2) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.1)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= netcoreapp1.1) (>= netstandard2.0)) (>= netcoreapp2.0) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac)) (&& (>= netcoreapp1.1) (>= netstandard2.0)) (>= netcoreapp5.0) Microsoft.VisualStudio.Setup.Configuration.Interop (1.16.30) - restriction: >= net472 Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) @@ -881,28 +889,28 @@ NUGET Microsoft.Win32.SystemEvents (5.0) - restriction: >= netcoreapp3.0 Microsoft.NETCore.Platforms (>= 5.0) - restriction: >= netcoreapp2.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.303) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.404) - restriction: >= netstandard2.0 Microsoft.Build (>= 16.4) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 16.4) - restriction: >= netstandard2.0 Microsoft.Build.Tasks.Core (>= 16.4) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 16.4) - restriction: >= netstandard2.0 - Newtonsoft.Json (12.0.3) - restriction: >= netstandard2.0 - NuGet.Common (5.8.1) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 5.8.1) - restriction: || (>= net45) (>= netstandard2.0) - NuGet.Configuration (5.8.1) - restriction: >= netstandard2.0 - NuGet.Common (>= 5.8.1) - restriction: || (>= net45) (>= netstandard2.0) + Newtonsoft.Json (13.0.1) - restriction: >= netstandard2.0 + NuGet.Common (5.9) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 5.9) - restriction: || (>= net45) (>= netstandard2.0) + NuGet.Configuration (5.9) - restriction: >= netstandard2.0 + NuGet.Common (>= 5.9) - restriction: || (>= net45) (>= netstandard2.0) System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net45) (>= netstandard2.0) - NuGet.Frameworks (5.8.1) - restriction: >= netstandard2.0 - NuGet.Packaging (5.8.1) - restriction: >= netstandard2.0 + NuGet.Frameworks (5.9) - restriction: >= netstandard2.0 + NuGet.Packaging (5.9) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 9.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 5.8.1) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 5.8.1) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 5.9) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 5.9) - restriction: >= netstandard2.0 System.Security.Cryptography.Cng (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) System.Security.Cryptography.Pkcs (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Protocol (5.8.1) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 5.8.1) - restriction: >= netstandard2.0 - NuGet.Versioning (5.8.1) - restriction: >= netstandard2.0 - System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0)) (&& (>= monoandroid) (>= netcoreapp2.1)) (&& (>= monoandroid) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (>= netcoreapp2.0) (< netstandard1.1)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= xamarintvos)) (&& (>= netcoreapp2.0) (>= xamarinwatchos)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + NuGet.Protocol (5.9) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 5.9) - restriction: >= netstandard2.0 + NuGet.Versioning (5.9) - restriction: >= netstandard2.0 + System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.1)) (&& (>= monoandroid) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.CodeDom (5.0) - restriction: && (< net472) (>= netstandard2.0) System.Collections (4.3) - restriction: >= netcoreapp5.0 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0) @@ -916,7 +924,7 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0) - System.Drawing.Common (5.0.1) - restriction: >= netcoreapp3.0 + System.Drawing.Common (5.0.2) - restriction: >= netcoreapp3.0 Microsoft.Win32.SystemEvents (>= 5.0) - restriction: >= netcoreapp2.0 System.Formats.Asn1 (5.0) - restriction: || (&& (>= monoandroid) (>= netstandard2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< netcoreapp2.0) (>= netstandard2.1)) (>= netcoreapp3.0) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Globalization (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (>= netcoreapp5.0) @@ -935,11 +943,11 @@ NUGET System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.6) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0) System.Runtime.Extensions (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0) - System.Memory (4.5.4) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< net46) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (>= netcoreapp2.0) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Memory (4.5.4) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< net46) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (>= netcoreapp2.0) (&& (>= netcoreapp2.1) (< netstandard2.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netstandard2.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (>= monoandroid) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (>= net461) (&& (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Numerics.Vectors (>= 4.4) - restriction: && (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) + System.Numerics.Vectors (>= 4.5) - restriction: >= net461 System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (>= monoandroid) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Numerics.Vectors (4.5) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Numerics.Vectors (4.5) - restriction: || (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) System.Reactive (5.0) - restriction: >= netstandard2.0 System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net472) (&& (< netcoreapp3.1) (>= netstandard2.0)) (>= uap10.1) @@ -975,7 +983,7 @@ NUGET System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.5) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= netcoreapp1.1) (>= netstandard2.0)) (>= netcoreapp5.0) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0) - System.Runtime.CompilerServices.Unsafe (5.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0)) (&& (>= monoandroid) (>= netcoreapp2.1)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= monotouch) (>= netstandard2.0)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netstandard1.1)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (>= netcoreapp2.0) (>= xamarinios)) (&& (>= netcoreapp2.0) (>= xamarinmac)) (&& (>= netcoreapp2.0) (>= xamarintvos)) (&& (>= netcoreapp2.0) (>= xamarinwatchos)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (< netcoreapp5.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (&& (>= uap10.1) (>= xamarinios)) (&& (>= uap10.1) (>= xamarinmac)) + System.Runtime.CompilerServices.Unsafe (5.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.1)) (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (< netcoreapp5.0)) (&& (>= netcoreapp2.1) (< netstandard1.1)) (&& (>= netcoreapp2.1) (< netstandard2.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp3.0) (< netcoreapp5.0)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) System.Runtime.Extensions (4.3.1) - restriction: >= netcoreapp5.0 Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0) @@ -1030,15 +1038,16 @@ NUGET System.Text.Encoding.CodePages (5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) Microsoft.NETCore.Platforms (>= 5.0) - restriction: >= netcoreapp2.0 System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp5.0)) - System.Text.Encodings.Web (5.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.1)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) - System.Memory (>= 4.5.4) - restriction: || (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) (>= net461) (>= uap10.1) - System.Text.Json (5.0.1) - restriction: || (>= net472) (>= netcoreapp2.1) + System.Text.Encodings.Web (5.0.1) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.1)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp3.0) (< netcoreapp5.0)) + System.Buffers (>= 4.5.1) - restriction: || (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (>= net461) + System.Memory (>= 4.5.4) - restriction: || (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (>= uap10.1) + System.Text.Json (5.0.2) - restriction: || (>= net472) (>= netcoreapp2.1) Microsoft.Bcl.AsyncInterfaces (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Buffers (>= 4.5.1) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (>= uap10.1) System.Numerics.Vectors (>= 4.5) - restriction: || (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (>= net461) - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Text.Encodings.Web (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp3.0) (< netcoreapp5.0)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Text.Encodings.Web (>= 5.0.1) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp3.0) (< netcoreapp5.0)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (>= uap10.1) System.ValueTuple (>= 4.5) - restriction: >= net461 System.Threading.Tasks (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (>= netcoreapp5.0) diff --git a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs index d034e2744..aea1b1312 100644 --- a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs +++ b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs @@ -2146,25 +2146,6 @@ type ApiDocModel internal (substitutions, collection, entityInfos, root, qualify let dllFiles = projects |> List.map (fun p -> Path.GetFullPath p.Path) let urlRangeHighlight = defaultArg urlRangeHighlight (fun url start stop -> String.Format("{0}#L{1}-{2}", url, start, stop)) - // When resolving assemblies, look in folders where all DLLs live - AppDomain.CurrentDomain.add_AssemblyResolve(System.ResolveEventHandler(fun o e -> - Log.verbf "Resolving assembly: %s" e.Name - let asmName = System.Reflection.AssemblyName(e.Name) - let asmOpt = - dllFiles |> Seq.tryPick (fun dll -> - let root = Path.GetDirectoryName(dll) - let file = root @@ (asmName.Name + ".dll") - if File.Exists(file) then - try - let bytes = File.ReadAllBytes(file) - Some(System.Reflection.Assembly.Load(bytes)) - with e -> - printfn "Couldn't load Assembly\n%s\n%s" e.Message e.StackTrace - None - else None ) - defaultArg asmOpt null - )) - // Compiler arguments used when formatting code snippets inside Markdown comments let codeFormatCompilerArgs = [ for dir in libDirs do yield sprintf "-I:\"%s\"" dir @@ -2173,8 +2154,7 @@ type ApiDocModel internal (substitutions, collection, entityInfos, root, qualify printfn " loading %d assemblies..." dllFiles.Length let resolvedList = - //FSharpAssembly.LoadFiles(projects, libDirs, otherFlags = otherFlags) - FSharpAssembly.LoadFiles(dllFiles, libDirs, otherFlags = otherFlags, manualResolve=true) + FSharpAssembly.LoadFiles(dllFiles, libDirs, otherFlags = otherFlags) |> List.zip projects // generate the names for the html files beforehand so we can resolve links. diff --git a/src/FSharp.Formatting.CommandTool/BuildCommand.fs b/src/FSharp.Formatting.CommandTool/BuildCommand.fs index f157562b1..5bbedc228 100644 --- a/src/FSharp.Formatting.CommandTool/BuildCommand.fs +++ b/src/FSharp.Formatting.CommandTool/BuildCommand.fs @@ -415,15 +415,29 @@ type CoreBuildOptions(watch) = (projects |> List.map getTime |> List.toArray)) Utils.cacheBinary cacheFile (fun (_, key2) -> key1 = key2) - (fun () -> Crack.crackProjects (this.strict, this.extraMsbuildProperties, userRoot, userCollectionName, userParameters, projects), key1) + (fun () -> + let props = + this.extraMsbuildProperties + |> Seq.toList + |> List.map (fun s -> + let arr = s.Split("=") + if arr.Length > 1 then + arr.[0], String.concat "=" arr.[1..] + else + failwith "properties must be of the form 'PropName=PropValue'") + Crack.crackProjects (this.strict, props, userRoot, userCollectionName, userParameters, projects), key1) if crackedProjects.Length > 0 then printfn "" printfn "Inputs for API Docs:" - for (dllFile, _, _, _, _, _, _, _, _) in crackedProjects do + for (dllFile, _, _, _, _, _, _, _, _, _) in crackedProjects do printfn " %s" dllFile - for (dllFile, _, _, _, _, _, _, _, _) in crackedProjects do + //printfn "Comand lines for API Docs:" + //for (_, runArguments, _, _, _, _, _, _, _, _) in crackedProjects do + // printfn " %O" runArguments + + for (dllFile, _, _, _, _, _, _, _, _, _) in crackedProjects do if not (File.Exists dllFile) then let msg = sprintf "*** %s does not exist, has it been built? You may need to provide --properties Configuration=Release." dllFile if this.strict then @@ -440,13 +454,13 @@ type CoreBuildOptions(watch) = // The substitutions may differ for some projects due to different settings in the project files, if so show that let pd = dict docsParameters - for (dllFile, _, _, _, _, _, _, _, projectParameters) in crackedProjects do + for (dllFile, _, _, _, _, _, _, _, _, projectParameters) in crackedProjects do for (((ParamKey pkv2) as pk2) , p2) in projectParameters do if pd.ContainsKey pk2 && pd.[pk2] <> p2 then printfn " (%s) %s --> %s" (Path.GetFileNameWithoutExtension(dllFile)) pkv2 p2 let apiDocInputs = - [ for (dllFile, repoUrlOption, repoBranchOption, repoTypeOption, projectMarkdownComments, projectWarn, projectSourceFolder, projectSourceRepo, projectParameters) in crackedProjects -> + [ for (dllFile, _, repoUrlOption, repoBranchOption, repoTypeOption, projectMarkdownComments, projectWarn, projectSourceFolder, projectSourceRepo, projectParameters) in crackedProjects -> let sourceRepo = match projectSourceRepo with | Some s -> Some s @@ -482,6 +496,22 @@ type CoreBuildOptions(watch) = Warn = projectWarn; PublicOnly = not this.nonpublic } ] + // Compute the merge of all referenced DLLs across all projects + // so they can be resolved during API doc generation. + // + // TODO: This is inaccurate: the different projects might not be referencing the same DLLs. + // We should do doc generation for each output of each proejct separately + let apiDocOtherFlags = + [ for (_dllFile, otherFlags, _, _, _, _, _, _, _, _) in crackedProjects do + for otherFlag in otherFlags do + if otherFlag.StartsWith("-r:") then + if File.Exists(otherFlag.[3..]) then + yield otherFlag + else + printfn "NOTE: the reference '%s' was not seen on disk, ignoring" otherFlag ] + // TODO: This 'distinctBy' is merging references that may be inconsistent across the project set + |> List.distinctBy (fun ref -> Path.GetFileName(ref.[3..])) + let output = if this.output = "" then if watch then "tmp/watch" else "output" @@ -584,7 +614,7 @@ type CoreBuildOptions(watch) = printfn "" printfn "API docs:" printfn " generating model for %d assemblies in API docs..." apiDocInputs.Length - + let model, globals, index, phase2 = match outputKind with | OutputKind.Html -> @@ -595,7 +625,7 @@ type CoreBuildOptions(watch) = substitutions = docsParameters, qualify = this.qualify, ?template = initialTemplate2, - otherFlags = Seq.toList this.fscoptions, + otherFlags = apiDocOtherFlags @ Seq.toList this.fscoptions, root = root, libDirs = paths, strict = this.strict @@ -608,7 +638,7 @@ type CoreBuildOptions(watch) = substitutions = docsParameters, qualify = this.qualify, ?template = initialTemplate2, - otherFlags = Seq.toList this.fscoptions, + otherFlags = apiDocOtherFlags @ Seq.toList this.fscoptions, root = root, libDirs = paths, strict = this.strict diff --git a/src/FSharp.Formatting.CommandTool/FSharp.Formatting.CommandTool.fsproj b/src/FSharp.Formatting.CommandTool/FSharp.Formatting.CommandTool.fsproj index 8e3b005ec..df4ee8311 100644 --- a/src/FSharp.Formatting.CommandTool/FSharp.Formatting.CommandTool.fsproj +++ b/src/FSharp.Formatting.CommandTool/FSharp.Formatting.CommandTool.fsproj @@ -9,9 +9,15 @@ true true true + true + + + + + Common\AssemblyInfo.fs diff --git a/src/FSharp.Formatting.CommandTool/ProjectCracker.fs b/src/FSharp.Formatting.CommandTool/ProjectCracker.fs index 01980f747..89c02ec3d 100644 --- a/src/FSharp.Formatting.CommandTool/ProjectCracker.fs +++ b/src/FSharp.Formatting.CommandTool/ProjectCracker.fs @@ -7,11 +7,13 @@ open System.Xml open FSharp.Formatting.Templating -open Dotnet.ProjInfo -open Dotnet.ProjInfo.Workspace +open Ionide2.ProjInfo +open Ionide2.ProjInfo.Types [] module Utils = + // Needs to be done before anything else?!? + let msbuildExe = Ionide2.ProjInfo.Init.init() let ensureDirectory path = let dir = DirectoryInfo(path) if not dir.Exists then dir.Create() @@ -58,10 +60,15 @@ module Utils = module Crack = + let (|ConditionEquals|_|) (str: string) (arg: string) = + if System.String.Compare(str, arg, System.StringComparison.OrdinalIgnoreCase) = 0 then + Some() + else + None let msbuildPropBool (s: string) = match s.Trim() with | "" -> None - | Inspect.MSBuild.ConditionEquals "True" -> Some true + | ConditionEquals "True" -> Some true | _ -> Some false let runProcess (log: string -> unit) (workingDir: string) (exePath: string) (args: string) = @@ -93,12 +100,11 @@ module Crack = exitCode, (workingDir, exePath, args) type private CrackErrors= - | CouldNotGetProperties of Inspect.GetResult - | NotASingleResult of list>> | GetProjectOptionsErrors of string * (string list) type CrackedProjectInfo = { ProjectFileName : string + ProjectOptions : ProjectOptions option TargetPath : string option IsTestProject : bool IsLibrary : bool @@ -133,39 +139,6 @@ module Crack = } let private crackProjectFileAndIncludeTargetFrameworks slnDir extraMsbuildProperties (file : string) = - let mapToCrackedProjectInfo (props:Map) file= - let msbuildPropString prop = props |> Map.tryFind prop |> Option.bind (function s when String.IsNullOrWhiteSpace(s) -> None | s -> Some s) - let msbuildPropBool prop = prop |> msbuildPropString |> Option.bind msbuildPropBool - - { ProjectFileName = file - TargetPath = msbuildPropString "TargetPath" - IsTestProject = msbuildPropBool "IsTestProject" |> Option.defaultValue false - IsLibrary = msbuildPropString "OutputType" |> Option.map (fun s -> s.ToLowerInvariant()) |> ((=) (Some "library")) - IsPackable = msbuildPropBool "IsPackable" |> Option.defaultValue false - RepositoryUrl = msbuildPropString "RepositoryUrl" - RepositoryType = msbuildPropString "RepositoryType" - RepositoryBranch = msbuildPropString "RepositoryBranch" - FsDocsCollectionNameLink = msbuildPropString "FsDocsCollectionNameLink" - FsDocsSourceFolder = msbuildPropString "FsDocsSourceFolder" - FsDocsSourceRepository = msbuildPropString "FsDocsSourceRepository" - FsDocsLicenseLink = msbuildPropString "FsDocsLicenseLink" - FsDocsReleaseNotesLink = msbuildPropString "FsDocsReleaseNotesLink" - FsDocsLogoLink = msbuildPropString "FsDocsLogoLink" - FsDocsLogoSource = msbuildPropString "FsDocsLogoSource" - FsDocsNavbarPosition = msbuildPropString "FsDocsNavbarPosition" - FsDocsTheme = msbuildPropString "FsDocsTheme" - FsDocsWarnOnMissingDocs = msbuildPropBool "FsDocsWarnOnMissingDocs" |> Option.defaultValue false - UsesMarkdownComments = msbuildPropBool "UsesMarkdownComments" |> Option.defaultValue false - PackageProjectUrl = msbuildPropString "PackageProjectUrl" - Authors = msbuildPropString "Authors" - GenerateDocumentationFile = msbuildPropBool "GenerateDocumentationFile" |> Option.defaultValue false - PackageLicenseExpression = msbuildPropString "PackageLicenseExpression" - PackageTags = msbuildPropString "PackageTags" - Copyright = msbuildPropString "Copyright" - PackageVersion = msbuildPropString "PackageVersion" - PackageIconUrl = msbuildPropString "PackageIconUrl" - RepositoryCommit = msbuildPropString "RepositoryCommit" } - let additionalInfo = [ "OutputType" "IsTestProject" @@ -198,38 +171,62 @@ module Crack = //"PackageReleaseNotes" "RepositoryCommit" "TargetFrameworks" + "RunArguments" ] - let gp() = Inspect.getProperties ("TargetPath" :: additionalInfo) + let gp = ("TargetPath" :: additionalInfo) let loggedMessages = System.Collections.Concurrent.ConcurrentQueue() - let runCmd exePath args = - let args = args @ [ yield "/p:DesignTimeBuild=true"; yield! Seq.map ((+) "/p:") extraMsbuildProperties] - //printfn "%s, args = %A" exePath args - let res = runProcess loggedMessages.Enqueue slnDir exePath (args |> String.concat " ") - //printfn "done..." - res - let msbuildPath = Inspect.MSBuildExePath.DotnetMsbuild "dotnet" - let msbuildExec = Inspect.msbuild msbuildPath runCmd - let result = file |> Inspect.getProjectInfos loggedMessages.Enqueue msbuildExec [gp] [] + let result = ProjectLoader.getProjectInfo file msbuildExe extraMsbuildProperties false gp + //file |> Inspect.getProjectInfos loggedMessages.Enqueue msbuildExec [gp] [] let msgs = (loggedMessages.ToArray() |> Array.toList) match result with - | Ok [gpResult] -> - match gpResult with - | Ok (Inspect.GetResult.Properties props) -> - let props = props |> Map.ofList - //printfn "props = %A" (Map.toList props) - let msbuildPropString prop = props |> Map.tryFind prop |> Option.bind (function s when String.IsNullOrWhiteSpace(s) -> None | s -> Some s) - let splitTargetFrameworks = function Some (s:string) -> s.Split(";", StringSplitOptions.RemoveEmptyEntries) |> Array.map (fun s'->s'.Trim()) |> Some | _ -> None - let targetFrameworks = msbuildPropString "TargetFrameworks" |> splitTargetFrameworks - - Ok (targetFrameworks,mapToCrackedProjectInfo props file) - | Ok gp -> CouldNotGetProperties gp |> Result.Error - | Error err-> GetProjectOptionsErrors (string err, msgs) |> Result.Error - | Ok gps -> NotASingleResult gps |> Result.Error - | Error err-> GetProjectOptionsErrors (string err, msgs) |> Result.Error + | Ok projOptions -> + + let props = projOptions.CustomProperties |> List.map (fun p -> p.Name, p.Value)|> Map.ofList + //printfn "props = %A" (Map.toList props) + let msbuildPropString prop = props |> Map.tryFind prop |> Option.bind (function s when String.IsNullOrWhiteSpace(s) -> None | s -> Some s) + let splitTargetFrameworks = function Some (s:string) -> s.Split(";", StringSplitOptions.RemoveEmptyEntries) |> Array.map (fun s'->s'.Trim()) |> Some | _ -> None + let targetFrameworks = msbuildPropString "TargetFrameworks" |> splitTargetFrameworks + + let msbuildPropBool prop = prop |> msbuildPropString |> Option.bind msbuildPropBool + let projOptions2 = + + { ProjectFileName = file + ProjectOptions = Some projOptions + TargetPath = msbuildPropString "TargetPath" + IsTestProject = msbuildPropBool "IsTestProject" |> Option.defaultValue false + IsLibrary = msbuildPropString "OutputType" |> Option.map (fun s -> s.ToLowerInvariant()) |> ((=) (Some "library")) + IsPackable = msbuildPropBool "IsPackable" |> Option.defaultValue false + RepositoryUrl = msbuildPropString "RepositoryUrl" + RepositoryType = msbuildPropString "RepositoryType" + RepositoryBranch = msbuildPropString "RepositoryBranch" + FsDocsCollectionNameLink = msbuildPropString "FsDocsCollectionNameLink" + FsDocsSourceFolder = msbuildPropString "FsDocsSourceFolder" + FsDocsSourceRepository = msbuildPropString "FsDocsSourceRepository" + FsDocsLicenseLink = msbuildPropString "FsDocsLicenseLink" + FsDocsReleaseNotesLink = msbuildPropString "FsDocsReleaseNotesLink" + FsDocsLogoLink = msbuildPropString "FsDocsLogoLink" + FsDocsLogoSource = msbuildPropString "FsDocsLogoSource" + FsDocsNavbarPosition = msbuildPropString "FsDocsNavbarPosition" + FsDocsTheme = msbuildPropString "FsDocsTheme" + FsDocsWarnOnMissingDocs = msbuildPropBool "FsDocsWarnOnMissingDocs" |> Option.defaultValue false + UsesMarkdownComments = msbuildPropBool "UsesMarkdownComments" |> Option.defaultValue false + PackageProjectUrl = msbuildPropString "PackageProjectUrl" + Authors = msbuildPropString "Authors" + GenerateDocumentationFile = msbuildPropBool "GenerateDocumentationFile" |> Option.defaultValue false + PackageLicenseExpression = msbuildPropString "PackageLicenseExpression" + PackageTags = msbuildPropString "PackageTags" + Copyright = msbuildPropString "Copyright" + PackageVersion = msbuildPropString "PackageVersion" + PackageIconUrl = msbuildPropString "PackageIconUrl" + RepositoryCommit = msbuildPropString "RepositoryCommit" } + + Ok (targetFrameworks, projOptions2) + | Error err-> + GetProjectOptionsErrors (string err, msgs) |> Result.Error let crackProjectFile slnDir extraMsbuildProperties (file : string) : CrackedProjectInfo = @@ -244,19 +241,15 @@ module Crack = | Ok (Some targetFrameworks,crackedProjectInfo) when crackedProjectInfo.TargetPath.IsNone && targetFrameworks.Length > 1 -> // no targetpath and there are multiple target frameworks // let us retry with first target framework specified: - let extraMsbuildPropertiesAndFirstTargetFramework = Seq.append extraMsbuildProperties [sprintf "TargetFramework=%s" targetFrameworks.[0]] + let extraMsbuildPropertiesAndFirstTargetFramework = List.append extraMsbuildProperties [("TargetFramework", targetFrameworks.[0])] let result2 = crackProjectFileAndIncludeTargetFrameworks slnDir extraMsbuildPropertiesAndFirstTargetFramework file match result2 with | Ok (_,crackedProjectInfo) -> crackedProjectInfo - | Error (CouldNotGetProperties ok) -> failwithf "huh? ok = %A" ok | Error (GetProjectOptionsErrors (err, msgs)) -> failwithf "error - %s\nlog - %s" (err.ToString()) (String.concat "\n" msgs) - | Error (NotASingleResult ok) -> failwithf "huh? ok = %A" ok | Ok (_,crackedProjectInfo) -> crackedProjectInfo - | Error (CouldNotGetProperties ok) -> failwithf "huh? ok = %A" ok | Error (GetProjectOptionsErrors (err, msgs)) -> failwithf "error - %s\nlog - %s" (err.ToString()) (String.concat "\n" msgs) - | Error (NotASingleResult ok) -> failwithf "huh? ok = %A" ok let getProjectsFromSlnFile (slnPath : string) = match InspectSln.tryParseSln slnPath with @@ -317,11 +310,11 @@ module Crack = let projectInfos = projectFiles |> Array.ofList - |> Array.Parallel.choose (fun p -> + |> Array.choose (fun p -> try Some (crackProjectFile slnDir extraMsbuildProperties p) with e -> - printfn " skipping project '%s' because an error occurred while cracking it: %A" (Path.GetFileName p) e + printfn " skipping project '%s' because an error occurred while cracking it: %O" (Path.GetFileName p) e if strict then printfn "Project cracking failed and --strict is on, exiting" exit 1 @@ -368,6 +361,7 @@ module Crack = let projectInfoForDocs = { ProjectFileName = "" + ProjectOptions = None TargetPath = None IsTestProject = false IsLibrary = true @@ -431,6 +425,7 @@ module Crack = |> List.map (fun info -> let substitutions = parametersForProjectInfo info info.TargetPath.Value, + info.ProjectOptions.Value.OtherOptions, info.RepositoryUrl, info.RepositoryBranch, info.RepositoryType, diff --git a/src/FSharp.Formatting.CommandTool/external/InspectSln.fs b/src/FSharp.Formatting.CommandTool/external/InspectSln.fs new file mode 100644 index 000000000..157c5f352 --- /dev/null +++ b/src/FSharp.Formatting.CommandTool/external/InspectSln.fs @@ -0,0 +1,95 @@ +namespace Ionide2.ProjInfo + +open Ionide.ProjInfo.Sln + +module InspectSln = + + open System + open System.IO + + let private normalizeDirSeparators (path: string) = + match Path.DirectorySeparatorChar with + | '\\' -> path.Replace('/', '\\') + | '/' -> path.Replace('\\', '/') + | _ -> path + + type SolutionData = + { Items: SolutionItem list + Configurations: SolutionConfiguration list } + + and SolutionConfiguration = + { Id: string + ConfigurationName: string + PlatformName: string + IncludeInBuild: bool } + + and SolutionItem = + { Guid: Guid + Name: string + Kind: SolutionItemKind } + + and SolutionItemKind = + | MsbuildFormat of SolutionItemMsbuildConfiguration list + | Folder of (SolutionItem list) * (string list) + | Unsupported + | Unknown + + and SolutionItemMsbuildConfiguration = + { Id: string + ConfigurationName: string + PlatformName: string } + + let tryParseSln (slnFilePath: string) = + let parseSln (sln: Construction.SolutionFile) = + let slnDir = Path.GetDirectoryName slnFilePath + + let makeAbsoluteFromSlnDir = + let makeAbs (path: string) = + if Path.IsPathRooted path + then path + else Path.Combine(slnDir, path) |> Path.GetFullPath + + normalizeDirSeparators >> makeAbs + + let rec parseItem (item: Construction.ProjectInSolution) = + let parseKind (item: Construction.ProjectInSolution) = + match item.ProjectType with + | Construction.SolutionProjectType.KnownToBeMSBuildFormat -> (item.RelativePath |> makeAbsoluteFromSlnDir), SolutionItemKind.MsbuildFormat [] + | Construction.SolutionProjectType.SolutionFolder -> + let children = sln.ProjectsInOrder |> Seq.filter (fun x -> x.ParentProjectGuid = item.ProjectGuid) |> Seq.map parseItem |> List.ofSeq + let files = item.FolderFiles |> Seq.map makeAbsoluteFromSlnDir |> List.ofSeq + item.ProjectName, SolutionItemKind.Folder(children, files) + | Construction.SolutionProjectType.EtpSubProject + | Construction.SolutionProjectType.WebDeploymentProject + | Construction.SolutionProjectType.WebProject -> (item.ProjectName |> makeAbsoluteFromSlnDir), SolutionItemKind.Unsupported + | Construction.SolutionProjectType.Unknown + | _ -> (item.ProjectName |> makeAbsoluteFromSlnDir), SolutionItemKind.Unknown + + let name, itemKind = parseKind item + + { Guid = item.ProjectGuid |> Guid.Parse + Name = name + Kind = itemKind } + + let items = sln.ProjectsInOrder |> Seq.filter (fun x -> isNull x.ParentProjectGuid) |> Seq.map parseItem + + let data = + { Items = items |> List.ofSeq + Configurations = [] } + + (slnFilePath, data) + + try + slnFilePath |> Construction.SolutionFile.Parse |> parseSln |> Ok + with ex -> Error ex + + let loadingBuildOrder (data: SolutionData) = + + let rec projs (item: SolutionItem) = + match item.Kind with + | MsbuildFormat items -> [ item.Name ] + | Folder (items, _) -> items |> List.collect projs + | Unsupported + | Unknown -> [] + + data.Items |> List.collect projs diff --git a/src/FSharp.Formatting.CommandTool/external/Library.fs b/src/FSharp.Formatting.CommandTool/external/Library.fs new file mode 100644 index 000000000..9cd7b5138 --- /dev/null +++ b/src/FSharp.Formatting.CommandTool/external/Library.fs @@ -0,0 +1,688 @@ +namespace Ionide2.ProjInfo + +open System +open System.Collections.Generic +open Microsoft.Build.Evaluation +open Microsoft.Build.Framework +open System.Runtime.Loader +open System.IO +open Microsoft.Build.Execution +open Types +open Microsoft.Build.Graph + +[] +module Init = + ///Initialize the MsBuild integration. Returns path to MsBuild tool that was detected by Locator. Needs to be called before doing anything else + let init () = + let instance = Microsoft.Build.Locator.MSBuildLocator.RegisterDefaults() + //Workaround from https://github.com/microsoft/MSBuildLocator/issues/86#issuecomment-640275377 + AssemblyLoadContext.Default.add_Resolving + (fun assemblyLoadContext assemblyName -> + let path = Path.Combine(instance.MSBuildPath, assemblyName.Name + ".dll") + + if File.Exists path then + assemblyLoadContext.LoadFromAssemblyPath path + else + null) + + ToolsPath instance.MSBuildPath + +///Low level APIs for single project loading. Doesn't provide caching, and doesn't follow p2p references. +/// In most cases you want to use `Ionide.ProjInf.WorkspaceLoader` type instead +module ProjectLoader = + + type LoadedProject = internal LoadedProject of ProjectInstance + + type ProjectLoadingStatus = + private + | Success of LoadedProject + | Error of string + + let internal logger (writer: StringWriter) = + { new ILogger with + member this.Initialize(eventSource: IEventSource) : unit = + // eventSource.ErrorRaised.Add(fun t -> writer.WriteLine t.Message) //Only log errors + eventSource.AnyEventRaised.Add(fun t -> writer.WriteLine t.Message) + + member this.Parameters : string = "" + + member this.Parameters + with set (v: string): unit = printfn "v" + + member this.Shutdown() : unit = () + member this.Verbosity : LoggerVerbosity = LoggerVerbosity.Detailed + + member this.Verbosity + with set (v: LoggerVerbosity): unit = () } + + let getTfm (path: string) = + let pi = ProjectInstance(path) + let tfm = pi.GetPropertyValue "TargetFramework" + + if String.IsNullOrWhiteSpace tfm then + let tfms = pi.GetPropertyValue "TargetFrameworks" + let actualTFM = tfms.Split(';').[0] + Some actualTFM + else + None + + let createLoggers (paths: string seq) (generateBinlog: bool) (sw: StringWriter) = + let logger = logger (sw) + + if generateBinlog then + let loggers = + paths + |> Seq.map (fun path -> Microsoft.Build.Logging.BinaryLogger(Parameters = Path.Combine(Path.GetDirectoryName(path), "msbuild.binlog")) :> ILogger) + + [ logger; yield! loggers ] + else + [ logger ] + + let getGlobalProps (path: string) (tfm: string option) (globalProperties: (string * string) list)= + dict [ "ProvideCommandLineArgs", "true" + "DesignTimeBuild", "true" + "SkipCompilerExecution", "true" + "GeneratePackageOnBuild", "false" + "Configuration", "Debug" + "DefineExplicitDefaults", "true" + "BuildProjectReferences", "false" + "UseCommonOutputDirectory", "false" + if tfm.IsSome then + "TargetFramework", tfm.Value + if path.EndsWith ".csproj" then + "NonExistentFile", Path.Combine("__NonExistentSubDir__", "__NonExistentFile__") + "DotnetProjInfo", "true" + yield! globalProperties ] + + + let buildArgs = + [| "ResolvePackageDependenciesDesignTime" + "_GenerateCompileDependencyCache" + "CoreCompile" |] + + let loadProject (path: string) (generateBinlog: bool) (ToolsPath toolsPath) globalProperties = + try + let tfm = getTfm path + + let globalProperties = getGlobalProps path tfm globalProperties + + match System.Environment.GetEnvironmentVariable "DOTNET_HOST_PATH" with + | null + | "" -> System.Environment.SetEnvironmentVariable("DOTNET_HOST_PATH", Ionide2.ProjInfo.Paths.dotnetRoot) + | _alreadySet -> () + + use pc = new ProjectCollection(globalProperties) + + let pi = pc.LoadProject(path, globalProperties, toolsVersion=null) + + use sw = new StringWriter() + + let loggers = createLoggers [ path ] generateBinlog sw + + let pi = pi.CreateProjectInstance() + + + let build = pi.Build(buildArgs, loggers) + + let t = sw.ToString() + + if build then + Success(LoadedProject pi) + else + Error(sw.ToString()) + with exc -> Error(exc.Message) + + let getFscArgs (LoadedProject project) = + project.Items |> Seq.filter (fun p -> p.ItemType = "FscCommandLineArgs") |> Seq.map (fun p -> p.EvaluatedInclude) + + let getCscArgs (LoadedProject project) = + project.Items |> Seq.filter (fun p -> p.ItemType = "CscCommandLineArgs") |> Seq.map (fun p -> p.EvaluatedInclude) + + let getP2Prefs (LoadedProject project) = + project.Items + |> Seq.filter (fun p -> p.ItemType = "_MSBuildProjectReferenceExistent") + |> Seq.map + (fun p -> + let relativePath = p.EvaluatedInclude + let path = p.GetMetadataValue "FullPath" + + let tfms = + if p.HasMetadata "TargetFramework" then + p.GetMetadataValue "TargetFramework" + else + p.GetMetadataValue "TargetFrameworks" + + { RelativePath = relativePath + ProjectFileName = path + TargetFramework = tfms }) + + let getCompileItems (LoadedProject project) = + project.Items + |> Seq.filter (fun p -> p.ItemType = "Compile") + |> Seq.map + (fun p -> + let name = p.EvaluatedInclude + + let link = + if p.HasMetadata "Link" then + Some(p.GetMetadataValue "Link") + else + None + + let fullPath = p.GetMetadataValue "FullPath" + + { Name = name + FullPath = fullPath + Link = link }) + + let getNuGetReferences (LoadedProject project) = + project.Items + |> Seq.filter (fun p -> p.ItemType = "Reference" && p.GetMetadataValue "NuGetSourceType" = "Package") + |> Seq.map + (fun p -> + let name = p.GetMetadataValue "NuGetPackageId" + let version = p.GetMetadataValue "NuGetPackageVersion" + let fullPath = p.GetMetadataValue "FullPath" + + { Name = name + Version = version + FullPath = fullPath }) + + let getProperties (LoadedProject project) (properties: string list) = + project.Properties + |> Seq.filter (fun p -> List.contains p.Name properties) + |> Seq.map + (fun p -> + { Name = p.Name + Value = p.EvaluatedValue }) + + let getSdkInfo (props: Property seq) = + let (|ConditionEquals|_|) (str: string) (arg: string) = + if System.String.Compare(str, arg, System.StringComparison.OrdinalIgnoreCase) = 0 then + Some() + else + None + + let (|StringList|_|) (str: string) = + str.Split([| ';' |], System.StringSplitOptions.RemoveEmptyEntries) |> List.ofArray |> Some + + let msbuildPropBool (s: Property) = + match s.Value.Trim() with + | "" -> None + | ConditionEquals "True" -> Some true + | _ -> Some false + + let msbuildPropStringList (s: Property) = + match s.Value.Trim() with + | "" -> [] + | StringList list -> list + | _ -> [] + + let msbuildPropBool (prop) = + props |> Seq.tryFind (fun n -> n.Name = prop) |> Option.bind msbuildPropBool + + let msbuildPropStringList prop = + props |> Seq.tryFind (fun n -> n.Name = prop) |> Option.map msbuildPropStringList + + let msbuildPropString prop = + props |> Seq.tryFind (fun n -> n.Name = prop) |> Option.map (fun n -> n.Value.Trim()) + + { IsTestProject = msbuildPropBool "IsTestProject" |> Option.defaultValue false + Configuration = msbuildPropString "Configuration" |> Option.defaultValue "" + IsPackable = msbuildPropBool "IsPackable" |> Option.defaultValue false + TargetFramework = msbuildPropString "TargetFramework" |> Option.defaultValue "" + TargetFrameworkIdentifier = msbuildPropString "TargetFrameworkIdentifier" |> Option.defaultValue "" + TargetFrameworkVersion = msbuildPropString "TargetFrameworkVersion" |> Option.defaultValue "" + + MSBuildAllProjects = msbuildPropStringList "MSBuildAllProjects" |> Option.defaultValue [] + MSBuildToolsVersion = msbuildPropString "MSBuildToolsVersion" |> Option.defaultValue "" + + ProjectAssetsFile = msbuildPropString "ProjectAssetsFile" |> Option.defaultValue "" + RestoreSuccess = msbuildPropBool "RestoreSuccess" |> Option.defaultValue false + + Configurations = msbuildPropStringList "Configurations" |> Option.defaultValue [] + TargetFrameworks = msbuildPropStringList "TargetFrameworks" |> Option.defaultValue [] + + RunArguments = msbuildPropString "RunArguments" + RunCommand = msbuildPropString "RunCommand" + + IsPublishable = msbuildPropBool "IsPublishable" } + + let mapToProject (path: string) (compilerArgs: string seq) (p2p: ProjectReference seq) (compile: CompileItem seq) (nugetRefs: PackageReference seq) (sdkInfo: ProjectSdkInfo) (props: Property seq) (customProps: Property seq) = + let projDir = Path.GetDirectoryName path + + let outputType, sourceFiles, otherOptions = + if path.EndsWith ".fsproj" then + let fscArgsNormalized = + //workaround, arguments in rsp can use relative paths + compilerArgs |> Seq.map (FscArguments.useFullPaths projDir) |> Seq.toList + + let sourceFiles, otherOptions = fscArgsNormalized |> List.partition (FscArguments.isSourceFile path) + let outputType = FscArguments.outType fscArgsNormalized + outputType, sourceFiles, otherOptions + else + let cscArgsNormalized = + //workaround, arguments in rsp can use relative paths + compilerArgs |> Seq.map (CscArguments.useFullPaths projDir) |> Seq.toList + + let sourceFiles, otherOptions = cscArgsNormalized |> List.partition (CscArguments.isSourceFile path) + let outputType = CscArguments.outType cscArgsNormalized + outputType, sourceFiles, otherOptions + + let compileItems = sourceFiles |> List.map (VisualTree.getCompileProjectItem (compile |> Seq.toList) path) + + let project = + { ProjectId = Some path + ProjectFileName = path + TargetFramework = sdkInfo.TargetFramework + SourceFiles = sourceFiles + OtherOptions = otherOptions + ReferencedProjects = List.ofSeq p2p + PackageReferences = List.ofSeq nugetRefs + LoadTime = DateTime.Now + TargetPath = props |> Seq.tryFind (fun n -> n.Name = "TargetPath") |> Option.map (fun n -> n.Value) |> Option.defaultValue "" + ProjectOutputType = outputType + ProjectSdkInfo = sdkInfo + Items = compileItems + CustomProperties = List.ofSeq customProps } + + + project + + + let getLoadedProjectInfo (path: string) customProperties project = + // let (LoadedProject p) = project + // let path = p.FullPath + + let properties = + [ "OutputType" + "IsTestProject" + "TargetPath" + "Configuration" + "IsPackable" + "TargetFramework" + "TargetFrameworkIdentifier" + "TargetFrameworkVersion" + "MSBuildAllProjects" + "ProjectAssetsFile" + "RestoreSuccess" + "Configurations" + "TargetFrameworks" + "RunArguments" + "RunCommand" + "IsPublishable" + "BaseIntermediateOutputPath" + "TargetPath" + "IsCrossTargetingBuild" + "TargetFrameworks" ] + + let p2pRefs = getP2Prefs project + + let comandlineArgs = + if path.EndsWith ".fsproj" then + getFscArgs project + else + getCscArgs project + + let compileItems = getCompileItems project + let nuGetRefs = getNuGetReferences project + let props = getProperties project properties + let sdkInfo = getSdkInfo props + let customProps = getProperties project customProperties + + if not sdkInfo.RestoreSuccess then + Result.Error "not restored" + else + + let proj = mapToProject path comandlineArgs p2pRefs compileItems nuGetRefs sdkInfo props customProps + + Result.Ok proj + + /// + /// Main entry point for project loading. + /// + /// Full path to the `.fsproj` file + /// Path to MsBuild obtained from `ProjectLoader.init ()` + /// Enable Binary Log generation + /// The global properties to use (e.g. Configuration=Release). Some additional global properties are pre-set by the tool + /// List of additional MsBuild properties that you want to obtain. + /// Returns the record instance representing the loaded project or string containing error message + let getProjectInfo (path: string) (toolsPath: ToolsPath) (globalProperties: (string*string) list) (generateBinlog: bool) (customProperties: string list) : Result = + let loadedProject = loadProject path generateBinlog toolsPath globalProperties + + match loadedProject with + | Success project -> getLoadedProjectInfo path customProperties project + | Error e -> Result.Error e + + + + +open Ionide.ProjInfo.Logging + +module WorkspaceLoaderViaProjectGraph = + let locker = obj () + + +type IWorkspaceLoader = + abstract member LoadProjects : string list * list * bool -> seq + abstract member LoadProjects : string list -> seq + abstract member LoadSln : string -> seq + + [] + abstract Notifications : IEvent + +type WorkspaceLoaderViaProjectGraph private (toolsPath: ToolsPath, ?globalProperties: (string*string) list) = + let globalProperties = defaultArg globalProperties [] + let logger = LogProvider.getLoggerFor () + let loadingNotification = new Event() + + + + let handleProjectGraphFailures f = + try + f () |> Some + with :? Microsoft.Build.Exceptions.InvalidProjectFileException as e -> + let p = e.ProjectFile + loadingNotification.Trigger(WorkspaceProjectState.Failed(p, ProjectNotFound(p))) + None + + let projectInstanceFactory projectPath (_globalProperties: IDictionary) (projectCollection: ProjectCollection) = + let tfm = ProjectLoader.getTfm projectPath + //let globalProperties = globalProperties |> Seq.toList |> List.map (fun (KeyValue(k,v)) -> (k,v)) + let globalProperties = ProjectLoader.getGlobalProps projectPath tfm globalProperties + ProjectInstance(projectPath, globalProperties, toolsVersion=null, projectCollection=projectCollection) + + let projectGraphProjs (paths: string seq) = + + handleProjectGraphFailures + <| fun () -> + paths |> Seq.iter (fun p -> loadingNotification.Trigger(WorkspaceProjectState.Loading p)) + let entryPoints = paths |> Seq.map ProjectGraphEntryPoint + ProjectGraph(entryPoints, projectCollection=ProjectCollection.GlobalProjectCollection, projectInstanceFactory=projectInstanceFactory) + + let projectGraphSln (path: string) = + handleProjectGraphFailures + <| fun () -> + let pg = ProjectGraph(path, ProjectCollection.GlobalProjectCollection, projectInstanceFactory) + + pg.ProjectNodesTopologicallySorted + |> Seq.distinctBy (fun p -> p.ProjectInstance.FullPath) + |> Seq.map (fun p -> p.ProjectInstance.FullPath) + |> Seq.iter (fun p -> loadingNotification.Trigger(WorkspaceProjectState.Loading p)) + + pg + + + + + + + let loadProjects (projects: ProjectGraph, customProperties: string list, generateBinlog: bool) = + try + lock WorkspaceLoaderViaProjectGraph.locker + <| fun () -> + let allKnown = projects.ProjectNodesTopologicallySorted |> Seq.distinctBy (fun p -> p.ProjectInstance.FullPath) + + let allKnownNames = allKnown |> Seq.map (fun p -> p.ProjectInstance.FullPath) |> Seq.toList + + logger.info ( + Log.setMessage "Started loading projects {count} {projects}" + >> Log.addContextDestructured "count" (allKnownNames |> Seq.length) + >> Log.addContextDestructured "projects" (allKnownNames) + ) + + + + let gbr = GraphBuildRequestData(projects, ProjectLoader.buildArgs, null, BuildRequestDataFlags.ReplaceExistingProjectInstance) + let bm = BuildManager.DefaultBuildManager + use sw = new StringWriter() + let loggers = ProjectLoader.createLoggers allKnownNames generateBinlog sw + bm.BeginBuild(new BuildParameters(Loggers = loggers)) + let result = bm.BuildRequest gbr + + bm.EndBuild() + + let resultsByNode = result.ResultsByNode |> Seq.map (fun kvp -> kvp.Key) |> Seq.cache + let buildProjs = resultsByNode |> Seq.map (fun p -> p.ProjectInstance.FullPath) |> Seq.toList + + logger.info ( + Log.setMessage "{overallCode}, projects built {count} {projects} " + >> Log.addContextDestructured "count" (buildProjs |> Seq.length) + >> Log.addContextDestructured "projects" (buildProjs) + >> Log.addContextDestructured "overallCode" result.OverallResult + >> Log.addExn result.Exception + ) + + let projects = + resultsByNode + |> Seq.map + (fun p -> + + p.ProjectInstance.FullPath, ProjectLoader.getLoadedProjectInfo p.ProjectInstance.FullPath customProperties (ProjectLoader.LoadedProject p.ProjectInstance)) + + |> Seq.choose + (fun (projectPath, projectOptionResult) -> + match projectOptionResult with + | Ok projectOptions -> + + Some projectOptions + | Error e -> + logger.error (Log.setMessage "Failed loading projects {error}" >> Log.addContextDestructured "error" e) + loadingNotification.Trigger(WorkspaceProjectState.Failed(projectPath, GenericError(projectPath, e))) + None) + + let allProjectOptions = projects |> Seq.toList + + allProjectOptions + |> Seq.iter + (fun po -> + logger.info (Log.setMessage "Project loaded {project}" >> Log.addContextDestructured "project" po.ProjectFileName) + loadingNotification.Trigger(WorkspaceProjectState.Loaded(po, allProjectOptions |> Seq.toList, false))) + + allProjectOptions :> seq<_> + with e -> + let msg = e.Message + + logger.error (Log.setMessage "Failed loading" >> Log.addExn e) + + projects.ProjectNodesTopologicallySorted + |> Seq.distinctBy (fun p -> p.ProjectInstance.FullPath) + |> Seq.iter + (fun p -> + + let p = p.ProjectInstance.FullPath + + if msg.Contains "The project file could not be loaded." then + loadingNotification.Trigger(WorkspaceProjectState.Failed(p, ProjectNotFound(p))) + elif msg.Contains "not restored" then + loadingNotification.Trigger(WorkspaceProjectState.Failed(p, ProjectNotRestored(p))) + else + loadingNotification.Trigger(WorkspaceProjectState.Failed(p, GenericError(p, msg)))) + + Seq.empty + + + + interface IWorkspaceLoader with + override this.LoadProjects(projects: string list, customProperties, generateBinlog: bool) = + projectGraphProjs projects + |> Option.map (fun pg -> loadProjects (pg, customProperties, generateBinlog)) + |> Option.defaultValue Seq.empty + + override this.LoadProjects(projects: string list) = this.LoadProjects(projects, [], false) + + override this.LoadSln(sln) = this.LoadSln(sln, [], false) + + [] + override this.Notifications = loadingNotification.Publish + + member this.LoadProjects(projects: string list, customProperties: string list, generateBinlog: bool) = + (this :> IWorkspaceLoader) + .LoadProjects(projects, customProperties, generateBinlog) + + member this.LoadProjects(projects: string list, customProperties) = + this.LoadProjects(projects, customProperties, false) + + + + + member this.LoadProject(project: string, customProperties: string list, generateBinlog: bool) = + this.LoadProjects([ project ], customProperties, generateBinlog) + + member this.LoadProject(project: string, customProperties: string list) = + this.LoadProjects([ project ], customProperties) + + member this.LoadProject(project: string) = + (this :> IWorkspaceLoader) + .LoadProjects([ project ]) + + + member this.LoadSln(sln: string, customProperties: string list, generateBinlog: bool) = + projectGraphSln sln + |> Option.map (fun pg -> loadProjects (pg, customProperties, generateBinlog)) + |> Option.defaultValue Seq.empty + + member this.LoadSln(sln, customProperties) = + this.LoadSln(sln, customProperties, false) + + + static member Create(toolsPath: ToolsPath, ?globalProperties) = + WorkspaceLoaderViaProjectGraph(toolsPath, ?globalProperties=globalProperties) :> IWorkspaceLoader + +type WorkspaceLoader private (toolsPath: ToolsPath, ?globalProperties: (string * string) list) = + let globalProperties = defaultArg globalProperties [] + let loadingNotification = new Event() + + + + interface IWorkspaceLoader with + + [] + override __.Notifications = loadingNotification.Publish + + override __.LoadProjects(projects: string list, customProperties: string list, generateBinlog: bool) = + let cache = Dictionary() + + let getAllKnonw () = + cache |> Seq.map (fun n -> n.Value) |> Seq.toList + + let rec loadProject p = + let res = ProjectLoader.getProjectInfo p toolsPath globalProperties generateBinlog customProperties + + match res with + | Ok project -> + try + cache.Add(p, project) + let lst = project.ReferencedProjects |> Seq.map (fun n -> n.ProjectFileName) |> Seq.toList + let info = Some project + lst, info + with exc -> + loadingNotification.Trigger(WorkspaceProjectState.Failed(p, GenericError(p, exc.Message))) + [], None + | Error msg when msg.Contains "The project file could not be loaded." -> + loadingNotification.Trigger(WorkspaceProjectState.Failed(p, ProjectNotFound(p))) + [], None + | Error msg when msg.Contains "not restored" -> + loadingNotification.Trigger(WorkspaceProjectState.Failed(p, ProjectNotRestored(p))) + [], None + | Error msg when msg.Contains "The operation cannot be completed because a build is already in progress." -> + //Try to load project again + Threading.Thread.Sleep(50) + loadProject p + | Error msg -> + loadingNotification.Trigger(WorkspaceProjectState.Failed(p, GenericError(p, msg))) + [], None + + let rec loadProjectList (projectList: string list) = + for p in projectList do + let newList, toTrigger = + if cache.ContainsKey p then + let project = cache.[p] + loadingNotification.Trigger(WorkspaceProjectState.Loaded(project, getAllKnonw (), true)) //TODO: Should it even notify here? + let lst = project.ReferencedProjects |> Seq.map (fun n -> n.ProjectFileName) |> Seq.toList + lst, None + else + loadingNotification.Trigger(WorkspaceProjectState.Loading p) + loadProject p + + + loadProjectList newList + + toTrigger + |> Option.iter (fun project -> loadingNotification.Trigger(WorkspaceProjectState.Loaded(project, getAllKnonw (), false))) + + loadProjectList projects + cache |> Seq.map (fun n -> n.Value) + + override this.LoadProjects(projects) = this.LoadProjects(projects, [], false) + + override this.LoadSln(sln) = this.LoadSln(sln, [], false) + + member this.LoadProjects(projects: string list, customProperties: string list, generateBinlog: bool) = + (this :> IWorkspaceLoader) + .LoadProjects(projects, customProperties, generateBinlog) + + member this.LoadProjects(projects, customProperties) = + this.LoadProjects(projects, customProperties, false) + + + + member this.LoadProject(project, customProperties: string list, generateBinlog: bool) = + this.LoadProjects([ project ], customProperties, generateBinlog) + + member this.LoadProject(project, customProperties: string list) = + this.LoadProjects([ project ], customProperties) + + member this.LoadProject(project) = + (this :> IWorkspaceLoader) + .LoadProjects([ project ]) + + + member this.LoadSln(sln, customProperties: string list, generateBinlog: bool) = + match InspectSln.tryParseSln sln with + | Ok (_, slnData) -> + let projs = InspectSln.loadingBuildOrder slnData + this.LoadProjects(projs, customProperties, generateBinlog) + | Error d -> failwithf "Cannot load the sln: %A" d + + member this.LoadSln(sln, customProperties) = + this.LoadSln(sln, customProperties, false) + + + + static member Create(toolsPath: ToolsPath, ?globalProperties) = + WorkspaceLoader(toolsPath, ?globalProperties=globalProperties) :> IWorkspaceLoader + +type ProjectViewerTree = + { Name: string + Items: ProjectViewerItem list } + +and [] ProjectViewerItem = Compile of string * ProjectViewerItemConfig + +and ProjectViewerItemConfig = { Link: string } + +module ProjectViewer = + + let render (proj: ProjectOptions) = + + let compileFiles = + let sources = proj.Items + + //the generated assemblyinfo.fs are not shown as sources + let isGeneratedAssemblyinfo (name: string) = + let projName = proj.ProjectFileName |> Path.GetFileNameWithoutExtension + //TODO check is in `obj` dir for the tfm + //TODO better, get the name from fsproj + //TODO cs too + name.EndsWith(sprintf "%s.AssemblyInfo.fs" projName) + + sources + |> List.choose + (function + | ProjectItem.Compile (name, fullpath) -> Some(name, fullpath)) + |> List.filter (fun (_, p) -> not (isGeneratedAssemblyinfo p)) + + { ProjectViewerTree.Name = proj.ProjectFileName |> Path.GetFileNameWithoutExtension + Items = + compileFiles + |> List.map (fun (name, fullpath) -> ProjectViewerItem.Compile(fullpath, { ProjectViewerItemConfig.Link = name })) } diff --git a/src/FSharp.Formatting.CommandTool/external/README.md b/src/FSharp.Formatting.CommandTool/external/README.md new file mode 100644 index 000000000..e82e7e1ef --- /dev/null +++ b/src/FSharp.Formatting.CommandTool/external/README.md @@ -0,0 +1,3 @@ + +Local copy of Ionide.ProjInfo awaiting https://github.com/ionide/proj-info/pull/107 + diff --git a/src/FSharp.Formatting.CommandTool/external/Types.fs b/src/FSharp.Formatting.CommandTool/external/Types.fs new file mode 100644 index 000000000..c64e8720f --- /dev/null +++ b/src/FSharp.Formatting.CommandTool/external/Types.fs @@ -0,0 +1,110 @@ +namespace Ionide2.ProjInfo + +open System + +module Types = + + type ProjectSdkInfo = + { IsTestProject: bool + Configuration: string // Debug + IsPackable: bool // true + TargetFramework: string // netcoreapp1.0 + TargetFrameworkIdentifier: string // .NETCoreApp + TargetFrameworkVersion: string // v1.0 + + MSBuildAllProjects: string list //;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\FSharp.NET.Sdk\Sdk\Sdk.props;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.props;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.DefaultItems.props;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.SupportedTargetFrameworks.props;e:\github\DotnetNewFsprojTestingSamples\sdk1.0\sample1\c1\obj\c1.fsproj.nuget.g.props;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\FSharp.NET.Sdk\Sdk\Sdk.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.BeforeCommon.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.DefaultAssemblyInfo.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.DefaultOutputPaths.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.RuntimeIdentifierInference.targets;C:\Users\e.sada\.nuget\packages\fsharp.net.sdk\1.0.5\build\FSharp.NET.Core.Sdk.targets;e:\github\DotnetNewFsprojTestingSamples\sdk1.0\sample1\c1\c1.fsproj;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\NuGet.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.TestPlatform.ImportAfter.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Microsoft.TestPlatform.targets;e:\github\DotnetNewFsprojTestingSamples\sdk1.0\sample1\c1\obj\c1.fsproj.nuget.g.targets;e:\github\DotnetNewFsprojTestingSamples\sdk1.0\sample1\c1\obj\c1.fsproj.proj-info.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.Common.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.DefaultItems.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.DisableStandardFrameworkResolution.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.GenerateAssemblyInfo.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.PreserveCompilationContext.targets;C:\dotnetcli\dotnet-dev-win-x64.1.0.4\sdk\1.0.4\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets + MSBuildToolsVersion: string // 15.0 + + ProjectAssetsFile: string // e:\github\DotnetNewFsprojTestingSamples\sdk1.0\sample1\c1\obj\project.assets.json + RestoreSuccess: bool // True + + Configurations: string list // Debug;Release + TargetFrameworks: string list // netcoreapp1.0;netstandard1.6 + + //may not exists + RunArguments: string option // exec "e:\github\DotnetNewFsprojTestingSamples\sdk1.0\sample1\c1\bin\Debug\netcoreapp1.0\c1.dll" + RunCommand: string option // dotnet + + //from 2.0 + IsPublishable: bool option } // true + + type ProjectReference = + { RelativePath: string + ProjectFileName: string + TargetFramework: string } + + type Property = { Name: string; Value: string } + + type PackageReference = + { Name: string + Version: string + FullPath: string } + + type ProjectOutputType = + | Library + | Exe + | Custom of string + + type ProjectItem = Compile of name: string * fullpath: string + + type ProjectOptions = + { ProjectId: string option + ProjectFileName: string + TargetFramework: string + SourceFiles: string list + OtherOptions: string list + ReferencedProjects: ProjectReference list + PackageReferences: PackageReference list + LoadTime: DateTime + TargetPath: string + ProjectOutputType: ProjectOutputType + ProjectSdkInfo: ProjectSdkInfo + Items: ProjectItem list + CustomProperties: Property list } + + type CompileItem = + { Name: string + FullPath: string + Link: string option } + + type ToolsPath = internal ToolsPath of string + + + type GetProjectOptionsErrors = + // projFile is duplicated in WorkspaceProjectState??? + | ProjectNotRestored of projFile: string + | ProjectNotFound of projFile: string + | LanguageNotSupported of projFile: string + | ProjectNotLoaded of projFile: string + | MissingExtraProjectInfos of projFile: string + | InvalidExtraProjectInfos of projFile: string * error: string + | ReferencesNotLoaded of projFile: string * referenceErrors: seq + | GenericError of projFile: string * string + member x.ProjFile = + match x with + | ProjectNotRestored projFile + | LanguageNotSupported projFile + | ProjectNotLoaded projFile + | MissingExtraProjectInfos projFile + | InvalidExtraProjectInfos (projFile, _) + | ReferencesNotLoaded (projFile, _) + | GenericError (projFile, _) -> projFile + | ProjectNotFound (projFile) -> projFile + + [] + type WorkspaceProjectState = + | Loading of string + | Loaded of loadedProject: ProjectOptions * knownProjects: ProjectOptions list * fromCache: bool + | Failed of string * GetProjectOptionsErrors + + member x.ProjFile = + match x with + | Loading proj -> proj + | Loaded (lp, _, _) -> lp.ProjectFileName + | Failed (proj, _) -> proj + + member x.DebugPrint = + match x with + | Loading proj -> "Loading: " + proj + | Loaded (lp, _, _) -> "Loaded: " + lp.ProjectFileName + | Failed (proj, _) -> "Failed: " + proj diff --git a/src/FSharp.Formatting.CommandTool/external/Utils.fs b/src/FSharp.Formatting.CommandTool/external/Utils.fs new file mode 100644 index 000000000..8cd7244a0 --- /dev/null +++ b/src/FSharp.Formatting.CommandTool/external/Utils.fs @@ -0,0 +1,127 @@ +namespace Ionide2.ProjInfo + +module internal Paths = + /// provides the path to the `dotnet` binary running this library, duplicated from + /// https://github.com/dotnet/sdk/blob/b91b88aec2684e3d2988df8d838d3aa3c6240a35/src/Cli/Microsoft.DotNet.Cli.Utils/Muxer.cs#L39 + let dotnetRoot = + System + .Diagnostics + .Process + .GetCurrentProcess() + .MainModule + .FileName + +module internal CommonHelpers = + + let chooseByPrefix (prefix: string) (s: string) = + if s.StartsWith(prefix) then + Some(s.Substring(prefix.Length)) + else + None + + let chooseByPrefix2 prefixes (s: string) = + prefixes |> List.tryPick (fun prefix -> chooseByPrefix prefix s) + + let splitByPrefix (prefix: string) (s: string) = + if s.StartsWith(prefix) then + Some(prefix, s.Substring(prefix.Length)) + else + None + + let splitByPrefix2 prefixes (s: string) = + prefixes |> List.tryPick (fun prefix -> splitByPrefix prefix s) + +module internal FscArguments = + + open CommonHelpers + open Types + open System.IO + + let outType rsp = + match List.tryPick (chooseByPrefix "--target:") rsp with + | Some "library" -> ProjectOutputType.Library + | Some "exe" -> ProjectOutputType.Exe + | Some v -> ProjectOutputType.Custom v + | None -> ProjectOutputType.Exe // default if arg is not passed to fsc + + let private outputFileArg = [ "--out:"; "-o:" ] + + let private makeAbs (projDir: string) (f: string) = + if Path.IsPathRooted f then + f + else + Path.Combine(projDir, f) + + let outputFile projDir rsp = + rsp |> List.tryPick (chooseByPrefix2 outputFileArg) |> Option.map (makeAbs projDir) + + let isCompileFile (s: string) = + let isArg = s.StartsWith("-") && s.Contains(":") + (not isArg) && (s.EndsWith(".fs") || s.EndsWith(".fsi") || s.EndsWith(".fsx")) + + let references = + //TODO valid also --reference: + List.choose (chooseByPrefix "-r:") + + let useFullPaths projDir (s: string) = + match s |> splitByPrefix2 outputFileArg with + | Some (prefix, v) -> prefix + (v |> makeAbs projDir) + | None -> + if isCompileFile s then + s |> makeAbs projDir |> Path.GetFullPath + else + s + + let isTempFile (name: string) = + let tempPath = System.IO.Path.GetTempPath() + let s = name.ToLower() + s.StartsWith(tempPath.ToLower()) + + let isDeprecatedArg n = + // TODO put in FCS + (n = "--times") || (n = "--no-jit-optimize") + + let isSourceFile (file: string): (string -> bool) = + if System.IO.Path.GetExtension(file) = ".fsproj" then + isCompileFile + else + (fun n -> n.EndsWith ".cs") + +module internal CscArguments = + open CommonHelpers + open System.IO + open Types + + let private outputFileArg = [ "--out:"; "-o:" ] + + let private makeAbs (projDir: string) (f: string) = + if Path.IsPathRooted f then + f + else + Path.Combine(projDir, f) + + let isCompileFile (s: string) = + let isArg = s.StartsWith("-") && s.Contains(":") + (not isArg) && s.EndsWith(".cs") + + let useFullPaths projDir (s: string) = + if isCompileFile s then + s |> makeAbs projDir |> Path.GetFullPath + else + s + + let isSourceFile (file: string): (string -> bool) = + if System.IO.Path.GetExtension(file) = ".csproj" then + isCompileFile + else + (fun n -> n.EndsWith ".fs") + + let outputFile projDir rsp = + rsp |> List.tryPick (chooseByPrefix2 outputFileArg) |> Option.map (makeAbs projDir) + + let outType rsp = + match List.tryPick (chooseByPrefix "/target:") rsp with + | Some "library" -> ProjectOutputType.Library + | Some "exe" -> ProjectOutputType.Exe + | Some v -> ProjectOutputType.Custom v + | None -> ProjectOutputType.Exe // default if arg is not passed to fsc diff --git a/src/FSharp.Formatting.CommandTool/external/VisualTree.fs b/src/FSharp.Formatting.CommandTool/external/VisualTree.fs new file mode 100644 index 000000000..8ea0fc99f --- /dev/null +++ b/src/FSharp.Formatting.CommandTool/external/VisualTree.fs @@ -0,0 +1,71 @@ +namespace Ionide2.ProjInfo + +module VisualTree = + + open System + open System.IO + open Types + + // let f1 = @"c:\prova\src\a\a.fs";; + // let f2 = @"c:\prova\src\b\b.fs";; + // let fsproj = @"c:\prova\src\a\a.fsproj";; + + let getDirEnsureTrailingSlash (projPath: string) = + let dir = Path.GetDirectoryName(projPath) + + if dir.EndsWith(Path.DirectorySeparatorChar.ToString()) + then dir + else dir + Path.DirectorySeparatorChar.ToString() + + let relativePathOf fromPath toPath = + let fromUri = Uri(fromPath) + let toUri = Uri(toPath) + fromUri.MakeRelativeUri(toUri).OriginalString + + let relativeToProjDir projPath filePath = + filePath |> relativePathOf (getDirEnsureTrailingSlash projPath) + + let visualPathVSBehaviour projPath filePath = + let relativePath = filePath |> relativeToProjDir projPath + + if relativePath.StartsWith("..") then + //if is not a child of proj directory, VS show only the name of the file + Path.GetFileName(relativePath) + else + relativePath + + let getVisualPath linkMetadata fullpathMetadata identity projPath = + let normalizeLink (linkPath: string) = + // always use / as path separator for link, regardless of OS, because is a virtual path + linkPath.Replace('\\', '/') + + match linkMetadata, fullpathMetadata with + | Some "", None + | None, None -> + //TODO fullpath was expected, something is wrong. log it + identity, identity + | Some l, None -> + //TODO fullpath was expected, something is wrong. log it + (normalizeLink l), identity + | Some "", Some path + | None, Some path -> + //TODO if is not contained in project dir, just show name, to + //behave like VS + let relativeToPrjDir = path |> visualPathVSBehaviour projPath + relativeToPrjDir, path + | Some l, Some path -> (normalizeLink l), path + + let getCompileProjectItem (projItems: CompileItem list) projPath sourceFile = + + let item = projItems |> List.tryFind (fun n -> n.FullPath = sourceFile) + + match item with + | None -> + let (name, fullpath) = projPath |> getVisualPath None (Some sourceFile) sourceFile + + ProjectItem.Compile(name, fullpath) + | Some p -> + + let (name, fullpath) = projPath |> getVisualPath p.Link (Some p.FullPath) p.Name + + ProjectItem.Compile(name, fullpath) diff --git a/src/FSharp.Formatting.CommandTool/paket.references b/src/FSharp.Formatting.CommandTool/paket.references index 065f82422..a32dd28c0 100644 --- a/src/FSharp.Formatting.CommandTool/paket.references +++ b/src/FSharp.Formatting.CommandTool/paket.references @@ -1,5 +1,5 @@ FSharp.Core CommandLineParser -Dotnet.ProjInfo -Dotnet.ProjInfo.Workspace +Ionide.ProjInfo +Ionide.ProjInfo.Sln Suave diff --git a/src/FSharp.Formatting.Common/FSharp.Formatting.Common.fsproj b/src/FSharp.Formatting.Common/FSharp.Formatting.Common.fsproj index 0b1614b80..91efff1d6 100644 --- a/src/FSharp.Formatting.Common/FSharp.Formatting.Common.fsproj +++ b/src/FSharp.Formatting.Common/FSharp.Formatting.Common.fsproj @@ -3,6 +3,7 @@ netstandard2.1 TRACE;YAAF_FSHARP_SCRIPTING_PUBLIC + true diff --git a/src/FSharp.Formatting.Common/YaafFSharpScripting.fs b/src/FSharp.Formatting.Common/YaafFSharpScripting.fs index 43c85a05e..cc35f6764 100644 --- a/src/FSharp.Formatting.Common/YaafFSharpScripting.fs +++ b/src/FSharp.Formatting.Common/YaafFSharpScripting.fs @@ -218,8 +218,7 @@ module internal CompilerServiceExtensions = x.FullName.Substring(0, match x.FullName.IndexOf("[") with | -1 -> x.FullName.Length | _ as i -> i) type FSharpAssembly with - static member LoadFiles (dllFiles: string list, ?libDirs: string list, ?otherFlags, ?manualResolve) = - let resolveDirs = defaultArg manualResolve true + static member LoadFiles (dllFiles: string list, ?libDirs: string list, ?otherFlags) = let libDirs = defaultArg libDirs [] let findReferences libDir = Directory.EnumerateFiles(libDir, "*.dll") @@ -237,26 +236,12 @@ module internal CompilerServiceExtensions = // See https://github.com/tpetricek/FSharp.Formatting/commit/5d14f45cd7e70c2164a7448ea50a6b9995166489 let _dllFiles, _libDirs = - if resolveDirs then libDirs |> List.collect findReferences |> List.append dllFiles, List.empty - else - dllFiles, libDirs |> List.map Path.GetFullPath let frameworkVersion = FSharpAssemblyHelper.defaultFrameworkVersion let refs = FSharpAssemblyHelper.getProjectReferences frameworkVersion otherFlags (Some _libDirs) _dllFiles let result = FSharpAssemblyHelper.resolve dllFiles refs result - static member FromAssembly (assembly:Assembly) = - let loc = - if assembly.GetName().Name =? "FSharp.Core" then - FSharpAssemblyHelper.findFSCore [assembly.Location] [] - else - assembly.Location - if isNull loc then None - else - let frameworkVersion = FSharpAssemblyHelper.defaultFrameworkVersion - FSharpAssemblyHelper.getProjectReferenceFromFile frameworkVersion loc - member x.FindType (t:Type) = x.Contents.Entities |> Seq.collect FSharpAssemblyHelper.enumerateEntities @@ -267,47 +252,6 @@ module internal CompilerServiceExtensions = Some entity | _ -> None) - module internal TypeNameHelper = - let rec fallbackName (t:System.Type) = - t.Name - and getFSharpTypeName (t:System.Type) = - let optFsharpName = - match FSharpAssembly.FromAssembly t.Assembly with - | Some fsAssembly -> - match fsAssembly.FindType t with - | Some entity -> Some entity.DisplayName - | None -> None - | None -> None - match optFsharpName with - | Some fsharpName -> fsharpName - | None -> fallbackName t - - type Type with - /// The name of the current type instance in F# source code. - member x.FSharpName = TypeNameHelper.getFSharpTypeName x - /// Gets the FullName of the current type in F# source code. - member x.FSharpFullName = x.Namespace + "." + x.FSharpName - - module internal TypeParamHelper = - let rec getFSharpTypeParameterList (t:System.Type) = - let builder = new System.Text.StringBuilder() - if t.IsGenericType then - let args = t.GetGenericArguments() - builder.Append "<" |> ignore - if t.IsGenericTypeDefinition then - args |> Seq.iter (fun _ -> builder.Append "_," |> ignore) - else - args |> Seq.iter (fun t -> builder.Append (sprintf "%s," (t.FSharpFullName + getFSharpTypeParameterList t)) |> ignore) - builder.Length <- builder.Length - 1 - builder.Append ">" |> ignore - builder.ToString() - - type Type with - /// The parameter list of the current type, sets "_" if the current instance is a generic definition. - member x.FSharpParamList = TypeParamHelper.getFSharpTypeParameterList x - /// Gets a string that can be used in F# source code to reference the current type instance. - member x.FSharpFullNameWithTypeArgs = x.FSharpFullName + x.FSharpParamList - type internal OutputData = { FsiOutput: string; ScriptOutput: string; Merged: string } diff --git a/tests/FSharp.ApiDocs.Tests/FSharp.ApiDocs.Tests.fsproj b/tests/FSharp.ApiDocs.Tests/FSharp.ApiDocs.Tests.fsproj index 7e2983d4c..4cb94c658 100644 --- a/tests/FSharp.ApiDocs.Tests/FSharp.ApiDocs.Tests.fsproj +++ b/tests/FSharp.ApiDocs.Tests/FSharp.ApiDocs.Tests.fsproj @@ -3,6 +3,7 @@ netcoreapp3.1 LatestMajor + true diff --git a/tests/FSharp.CodeFormat.Tests/FSharp.CodeFormat.Tests.fsproj b/tests/FSharp.CodeFormat.Tests/FSharp.CodeFormat.Tests.fsproj index b65eb6bcf..2300a4bc1 100644 --- a/tests/FSharp.CodeFormat.Tests/FSharp.CodeFormat.Tests.fsproj +++ b/tests/FSharp.CodeFormat.Tests/FSharp.CodeFormat.Tests.fsproj @@ -3,6 +3,7 @@ netcoreapp3.1 LatestMajor + true diff --git a/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj b/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj index 63eb403ab..92220c17b 100644 --- a/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj +++ b/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj @@ -3,6 +3,7 @@ netcoreapp3.1 LatestMajor + true diff --git a/tests/FSharp.Markdown.Tests/FSharp.Markdown.Tests.fsproj b/tests/FSharp.Markdown.Tests/FSharp.Markdown.Tests.fsproj index 3722b1e0d..396a5ab55 100644 --- a/tests/FSharp.Markdown.Tests/FSharp.Markdown.Tests.fsproj +++ b/tests/FSharp.Markdown.Tests/FSharp.Markdown.Tests.fsproj @@ -3,6 +3,7 @@ netcoreapp3.1 LatestMajor + true