From a4cc15766d9bc7842a6a2fe87d58fdf992b31c07 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Wed, 15 Mar 2023 23:26:33 +0530 Subject: [PATCH 01/72] Added net6.0 target to netstandard project --- src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj b/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj index f08e87b84..f1a3de09f 100644 --- a/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj +++ b/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.0;net6.0 ..\IO.Ably.ruleset Debug;Release;package false From 882abe81871fb1b35045774333fe93fecde0a6ed Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Wed, 15 Mar 2023 23:27:26 +0530 Subject: [PATCH 02/72] Suppressed dispose compile error for net6.0 build --- src/IO.Ably.Shared/Realtime/RealtimeChannel.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IO.Ably.Shared/Realtime/RealtimeChannel.cs b/src/IO.Ably.Shared/Realtime/RealtimeChannel.cs index f7055babf..9e3395b27 100644 --- a/src/IO.Ably.Shared/Realtime/RealtimeChannel.cs +++ b/src/IO.Ably.Shared/Realtime/RealtimeChannel.cs @@ -18,7 +18,10 @@ namespace IO.Ably.Realtime [DebuggerDisplay("{Name}. State = {_state}. Error = {ErrorReason} ")] internal class RealtimeChannel : EventEmitter, IRealtimeChannel { +#pragma warning disable CA2213 private readonly Handlers _handlers = new Handlers(); +#pragma warning restore CA2213 + private ChannelOptions _options; private ChannelState _state; private readonly PushChannel _pushChannel; From 76df6155fb1164ed49808bfc5d2a35a46f799747 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 16 Mar 2023 01:08:47 +0530 Subject: [PATCH 03/72] Added net7.0 target to netstandard project --- src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj b/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj index f1a3de09f..5fff24ed8 100644 --- a/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj +++ b/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net6.0 + netstandard2.0;net6.0;net7.0 ..\IO.Ably.ruleset Debug;Release;package false From 251ec7a4980c63546805373eba92506949fe3867 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 16 Mar 2023 01:09:34 +0530 Subject: [PATCH 04/72] Fixed compiler error caused by net7.0 target, renamed kvp to Kvp --- src/IO.Ably.Shared/HttpUtility.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/IO.Ably.Shared/HttpUtility.cs b/src/IO.Ably.Shared/HttpUtility.cs index 87bbd0ea0..fff57d766 100644 --- a/src/IO.Ably.Shared/HttpUtility.cs +++ b/src/IO.Ably.Shared/HttpUtility.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using kvp = System.Collections.Generic.KeyValuePair; +using Kvp = System.Collections.Generic.KeyValuePair; namespace IO.Ably { @@ -34,7 +34,7 @@ public static HttpValueCollection ParseQueryString(string query) /// public class HttpValueCollection { - private readonly List _data = new List(); + private readonly List _data = new List(); /// /// All the keys. @@ -66,7 +66,7 @@ public string this[string name] { // If the specified key already exists in the collection, setting this property overwrites the existing list of values with the specified value. _data.RemoveAll(i => i.Key == name); - _data.Add(new kvp(name, value)); + _data.Add(new Kvp(name, value)); } } @@ -93,7 +93,7 @@ public string[] GetValues(string name) /// value. public void Add(string name, string value) { - _data.Add(new kvp(name, value)); + _data.Add(new Kvp(name, value)); } /// From 426f1d2d5d6df1481663476a6fb6938ca73811fc Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 16 Mar 2023 01:10:57 +0530 Subject: [PATCH 05/72] Included net6.0 and net7.0 build DLLs into nuspec file --- nuget/io.ably.nuspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nuget/io.ably.nuspec b/nuget/io.ably.nuspec index 69cfc1b2e..b46a4782f 100644 --- a/nuget/io.ably.nuspec +++ b/nuget/io.ably.nuspec @@ -28,5 +28,7 @@ + + From 7ab7331edf8bd6757e6254aa505bd71e1a6ea6fd Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 16 Mar 2023 01:31:46 +0530 Subject: [PATCH 06/72] Added net6.0 and net7.0 targets inside dotnetcore test project --- .../IO.Ably.Tests.DotNetCore20.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.DotNetCore20.csproj b/src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.DotNetCore20.csproj index af142de46..9538b004f 100644 --- a/src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.DotNetCore20.csproj +++ b/src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.DotNetCore20.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + netcoreapp3.1;net6.0;net7.0 ..\IO.Ably.Tests.ruleset 8 From d942634a3d5b6a5062b34d85d82ba007832f387a Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 16 Mar 2023 01:37:28 +0530 Subject: [PATCH 07/72] Updated README, included support for .Net 6 and .Net 7 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 84b3121a2..44627403e 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,10 @@ This is a .NET client library for Ably. The library currently targets the [Ably ## Supported platforms +* .NET Standard 2.0+ +* .NET 6.x, 7.x (MAUI supported) * .NET (Core) 3.1+ * .NET Framework 4.8 -* .NET Standard 2.0+ * Mono 5.4+ * [Xamarin.Android 8.0+](https://developer.xamarin.com/releases/android/xamarin.android_8/xamarin.android_8.0/) * [Xamarin.iOS 11.4+](https://developer.xamarin.com/releases/ios/xamarin.ios_11/xamarin.ios_11.4/) @@ -49,7 +50,6 @@ The [Push Notifications Readme](PushNotifications.md) describes: ## Known Limitations * Browser push notifications in [Blazor](https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor) are not supported. -* [MAUI framework](https://dotnet.microsoft.com/en-us/apps/maui) is under testing and not yet fully supported, see [MAUI issue](https://github.com/ably/ably-dotnet/issues/1205). ## Documentation From c1a2128b4b87a8345e5008a8b1545fd617ccd512 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 16 Mar 2023 01:44:00 +0530 Subject: [PATCH 08/72] Fixed github test workflow, supported additional dotnet version installation --- .github/workflows/integration-test-linux.yml | 7 +++++-- .github/workflows/integration-test-macos.yml | 7 +++++-- .github/workflows/integration-test-windows.yml | 7 +++++-- .github/workflows/package.yml | 14 ++++++++++---- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/integration-test-linux.yml b/.github/workflows/integration-test-linux.yml index 1dcebfaee..75d06f2b3 100644 --- a/.github/workflows/integration-test-linux.yml +++ b/.github/workflows/integration-test-linux.yml @@ -16,9 +16,12 @@ jobs: with: submodules: 'recursive' - name: Download dotnet framework - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: - dotnet-version: '3.1.x' + dotnet-version: | + 3.1.x + 6.0.x + 7.0.x - name: Download fake-cli run: dotnet tool install fake-cli --version 5.20.4 --tool-path . - name: Unit tests diff --git a/.github/workflows/integration-test-macos.yml b/.github/workflows/integration-test-macos.yml index f68dc0211..4be6c88c5 100644 --- a/.github/workflows/integration-test-macos.yml +++ b/.github/workflows/integration-test-macos.yml @@ -16,9 +16,12 @@ jobs: with: submodules: 'recursive' - name: Download dotnet framework - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: - dotnet-version: '3.1.x' + dotnet-version: | + 3.1.x + 6.0.x + 7.0.x - name: Download fake-cli run: dotnet tool install fake-cli --version 5.20.4 --tool-path . - name: Restore packages diff --git a/.github/workflows/integration-test-windows.yml b/.github/workflows/integration-test-windows.yml index 4e88c8140..d3edd6d5c 100644 --- a/.github/workflows/integration-test-windows.yml +++ b/.github/workflows/integration-test-windows.yml @@ -20,9 +20,12 @@ jobs: with: submodules: 'recursive' - name: Download framework - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: - dotnet-version: '3.1.x' + dotnet-version: | + 3.1.x + 6.0.x + 7.0.x - name: Download fake-cli run: dotnet tool install fake-cli --version 5.20.4 --tool-path . - name: Unit tests diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 6086fa3cc..0a6c40cee 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -14,9 +14,12 @@ jobs: with: submodules: 'recursive' - name: Download dotnet framework - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: - dotnet-version: '3.1.x' + dotnet-version: | + 3.1.x + 6.0.x + 7.0.x - name: Download fake-cli run: dotnet tool install fake-cli --version 5.20.4 --tool-path . - name: Package @@ -38,9 +41,12 @@ jobs: with: submodules: 'recursive' - name: Download dotnet framework - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: - dotnet-version: '3.1.x' + dotnet-version: | + 3.1.x + 6.0.x + 7.0.x - name: Download fake-cli run: dotnet tool install fake-cli --version 5.20.4 --tool-path . - name: Restore packages From f796273513b7ec3d65d8a8b298e84a8e9c5deb4c Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 16 Mar 2023 02:58:34 +0530 Subject: [PATCH 09/72] Added platform identifiers for for dotnet 6 and dotnet 7 --- src/IO.Ably.NETStandard20/Platform.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/IO.Ably.NETStandard20/Platform.cs b/src/IO.Ably.NETStandard20/Platform.cs index 18d21a176..3c1fd18fa 100644 --- a/src/IO.Ably.NETStandard20/Platform.cs +++ b/src/IO.Ably.NETStandard20/Platform.cs @@ -16,7 +16,15 @@ static Platform() internal static bool HookedUpToNetworkEvents { get; private set; } + // Defined as per https://learn.microsoft.com/en-us/dotnet/standard/frameworks#preprocessor-symbols + // TODO : Get runtime platform info ( android, iOS ) using https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device/information?view=net-maui-7.0&tabs=windows +#if NET6_0 + public string PlatformId => "net6.0"; +#elif NET7_0 + public string PlatformId => "net7.0"; +#else public string PlatformId => "netstandard20"; +#endif public ITransportFactory TransportFactory => null; From a84561083ff0c8a8455cba8d9e125b0d7945d52a Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 17 Mar 2023 12:21:42 +0530 Subject: [PATCH 10/72] Upgraded .Net core test project to support .NET6 and .NET7 --- src/IO.Ably.NETStandard20/Properties/AssemblyInfo.cs | 2 +- ...Tests.DotNetCore20.csproj => IO.Ably.Tests.NET6_NET7.csproj} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/IO.Ably.Tests.DotNetCore20/{IO.Ably.Tests.DotNetCore20.csproj => IO.Ably.Tests.NET6_NET7.csproj} (98%) diff --git a/src/IO.Ably.NETStandard20/Properties/AssemblyInfo.cs b/src/IO.Ably.NETStandard20/Properties/AssemblyInfo.cs index f2dc5452f..22f7c2c66 100644 --- a/src/IO.Ably.NETStandard20/Properties/AssemblyInfo.cs +++ b/src/IO.Ably.NETStandard20/Properties/AssemblyInfo.cs @@ -12,7 +12,7 @@ [assembly: InternalsVisibleTo("IO.Ably.Push.Android, PublicKey=002400000480000094000000060200000024000052534131000400000100010001394bb0af9eb8e04f43676c91691de20f2137847e153e27bb96cf2dedf43bce3073f699ca136fb7f9eea0d9b9c6748e9c0be5543761945e101062f8770129512c4c397a08c1b459357e7a49a4dfd7e16ac9c84d1ab3fe1177b3e7741ea10eba746433691bbf1ad643bdf25bcf397a384f96e8d138b129bdb663189200d33dcf")] [assembly: InternalsVisibleTo("IO.Ably.Push.iOS, PublicKey=002400000480000094000000060200000024000052534131000400000100010001394bb0af9eb8e04f43676c91691de20f2137847e153e27bb96cf2dedf43bce3073f699ca136fb7f9eea0d9b9c6748e9c0be5543761945e101062f8770129512c4c397a08c1b459357e7a49a4dfd7e16ac9c84d1ab3fe1177b3e7741ea10eba746433691bbf1ad643bdf25bcf397a384f96e8d138b129bdb663189200d33dcf")] #if !PACKAGE -[assembly: InternalsVisibleTo("IO.Ably.Tests.DotNetCore20")] +[assembly: InternalsVisibleTo("IO.Ably.Tests.NET6_NET7")] [assembly: InternalsVisibleTo("Unity.Assets.Tests.AblySandbox")] [assembly: InternalsVisibleTo("Unity.Assets.Tests.EditMode")] [assembly: InternalsVisibleTo("Unity.Assets.Tests.PlayMode")] diff --git a/src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.DotNetCore20.csproj b/src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.NET6_NET7.csproj similarity index 98% rename from src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.DotNetCore20.csproj rename to src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.NET6_NET7.csproj index 9538b004f..e48056a84 100644 --- a/src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.DotNetCore20.csproj +++ b/src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.NET6_NET7.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1;net6.0;net7.0 + net6.0;net7.0 ..\IO.Ably.Tests.ruleset 8 From b854d8685de0b0f43ad3835a3dae72c71f1655d3 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 17 Mar 2023 13:09:29 +0530 Subject: [PATCH 11/72] Replaced references to dotnetcore2.0 with NET6_NET7 --- CONTRIBUTING.md | 2 +- build.fsx | 4 +-- src/IO.Ably.NetStandard.sln | 2 +- .../IO.Ably.Tests.NET6_NET7.csproj | 0 .../MsgPackStatsTest.json | 0 .../StatsFixture.json | 0 .../StatsInterval.json | 0 .../xunit.runner.json | 0 .../ChannelOptionsExtensions.cs | 2 +- .../IO.Ably.Tests.Shared.projitems | 2 +- .../Realtime/ChannelSandboxSpecs.cs | 2 +- src/IO.Ably.Xamarin.sln | 2 +- src/IO.Ably.sln | 28 ++++++++++--------- 13 files changed, 23 insertions(+), 21 deletions(-) rename src/{IO.Ably.Tests.DotNetCore20 => IO.Ably.Tests.NET6_NET7}/IO.Ably.Tests.NET6_NET7.csproj (100%) rename src/{IO.Ably.Tests.DotNetCore20 => IO.Ably.Tests.NET6_NET7}/MsgPackStatsTest.json (100%) rename src/{IO.Ably.Tests.DotNetCore20 => IO.Ably.Tests.NET6_NET7}/StatsFixture.json (100%) rename src/{IO.Ably.Tests.DotNetCore20 => IO.Ably.Tests.NET6_NET7}/StatsInterval.json (100%) rename src/{IO.Ably.Tests.DotNetCore20 => IO.Ably.Tests.NET6_NET7}/xunit.runner.json (100%) rename src/IO.Ably.Tests.Shared/{ => Extensions}/ChannelOptionsExtensions.cs (98%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ea3c57238..fc7302873 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ choco install nuget.commandline ``` Running `.\build.cmd` will start the build process and run the tests. By default it runs the NetFramework tests. -To run the Netcore build and tests you can run `.\build.cmd Test.NetStandard` +To run the Net6.0 and Net7.0 build and tests you can run `.\build.cmd Test.NetStandard` ## Working from source diff --git a/build.fsx b/build.fsx index 906b045c4..3556e0889 100644 --- a/build.fsx +++ b/build.fsx @@ -31,7 +31,7 @@ open Fake.DotNet.NuGet open System.Text.RegularExpressions let currentDir = __SOURCE_DIRECTORY__ -let netstandardTestDir = "src/IO.Ably.Tests.DotNetCore20" +let netstandardTestDir = "src/IO.Ably.Tests.NET6_NET7" let xUnit2 = XUnit2.run let NetStandardSolution = "src/IO.Ably.NetStandard.sln" @@ -218,7 +218,7 @@ let findFailedDotnetTestTests (resultsPath:string) = let runStandardTestsWithOptions testToRun (failOnError:bool) = Directory.ensure testResultsDir Trace.log " --- Testing net core version --- " - let project = Path.combine currentDir "src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.DotNetCore20.csproj" + let project = Path.combine currentDir "src/IO.Ably.Tests.NET6_NET7/IO.Ably.Tests.NET6_NET7.csproj" match testToRun with | Method testMethodName -> diff --git a/src/IO.Ably.NetStandard.sln b/src/IO.Ably.NetStandard.sln index a47f1b9b5..11fe4f2e5 100644 --- a/src/IO.Ably.NetStandard.sln +++ b/src/IO.Ably.NetStandard.sln @@ -29,7 +29,7 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Shared", "IO.Ably.S EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Shared.MsgPack", "IO.Ably.Shared.MsgPack\IO.Ably.Shared.MsgPack.shproj", "{EEBF3249-3CA3-4078-A188-F8B916C3F4C2}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IO.Ably.Tests.DotNetCore20", "IO.Ably.Tests.DotNetCore20\IO.Ably.Tests.DotNetCore20.csproj", "{4805A9DA-3412-4BE8-8B95-5A0EFDA1AC01}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IO.Ably.Tests.NET6_NET7", "IO.Ably.Tests.NET6_NET7\IO.Ably.Tests.NET6_NET7.csproj", "{4805A9DA-3412-4BE8-8B95-5A0EFDA1AC01}" EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Tests.Shared", "IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.shproj", "{1609F12C-8216-4E7C-ADE0-240BFE160242}" EndProject diff --git a/src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.NET6_NET7.csproj b/src/IO.Ably.Tests.NET6_NET7/IO.Ably.Tests.NET6_NET7.csproj similarity index 100% rename from src/IO.Ably.Tests.DotNetCore20/IO.Ably.Tests.NET6_NET7.csproj rename to src/IO.Ably.Tests.NET6_NET7/IO.Ably.Tests.NET6_NET7.csproj diff --git a/src/IO.Ably.Tests.DotNetCore20/MsgPackStatsTest.json b/src/IO.Ably.Tests.NET6_NET7/MsgPackStatsTest.json similarity index 100% rename from src/IO.Ably.Tests.DotNetCore20/MsgPackStatsTest.json rename to src/IO.Ably.Tests.NET6_NET7/MsgPackStatsTest.json diff --git a/src/IO.Ably.Tests.DotNetCore20/StatsFixture.json b/src/IO.Ably.Tests.NET6_NET7/StatsFixture.json similarity index 100% rename from src/IO.Ably.Tests.DotNetCore20/StatsFixture.json rename to src/IO.Ably.Tests.NET6_NET7/StatsFixture.json diff --git a/src/IO.Ably.Tests.DotNetCore20/StatsInterval.json b/src/IO.Ably.Tests.NET6_NET7/StatsInterval.json similarity index 100% rename from src/IO.Ably.Tests.DotNetCore20/StatsInterval.json rename to src/IO.Ably.Tests.NET6_NET7/StatsInterval.json diff --git a/src/IO.Ably.Tests.DotNetCore20/xunit.runner.json b/src/IO.Ably.Tests.NET6_NET7/xunit.runner.json similarity index 100% rename from src/IO.Ably.Tests.DotNetCore20/xunit.runner.json rename to src/IO.Ably.Tests.NET6_NET7/xunit.runner.json diff --git a/src/IO.Ably.Tests.Shared/ChannelOptionsExtensions.cs b/src/IO.Ably.Tests.Shared/Extensions/ChannelOptionsExtensions.cs similarity index 98% rename from src/IO.Ably.Tests.Shared/ChannelOptionsExtensions.cs rename to src/IO.Ably.Tests.Shared/Extensions/ChannelOptionsExtensions.cs index df98a7aa7..615e5f0d5 100644 --- a/src/IO.Ably.Tests.Shared/ChannelOptionsExtensions.cs +++ b/src/IO.Ably.Tests.Shared/Extensions/ChannelOptionsExtensions.cs @@ -1,6 +1,6 @@ using System; -namespace IO.Ably.Tests.DotNetCore20 +namespace IO.Ably.Tests.Extensions { /// /// Helper methods to make adding channel options easier. diff --git a/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems b/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems index f47b7c171..3883abbfd 100644 --- a/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems +++ b/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems @@ -20,7 +20,6 @@ - @@ -31,6 +30,7 @@ + diff --git a/src/IO.Ably.Tests.Shared/Realtime/ChannelSandboxSpecs.cs b/src/IO.Ably.Tests.Shared/Realtime/ChannelSandboxSpecs.cs index 1074733ee..4ffa72aed 100644 --- a/src/IO.Ably.Tests.Shared/Realtime/ChannelSandboxSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Realtime/ChannelSandboxSpecs.cs @@ -8,7 +8,7 @@ using FluentAssertions; using IO.Ably.Encryption; using IO.Ably.Realtime; -using IO.Ably.Tests.DotNetCore20; +using IO.Ably.Tests.Extensions; using IO.Ably.Tests.Infrastructure; using IO.Ably.Types; using Newtonsoft.Json.Linq; diff --git a/src/IO.Ably.Xamarin.sln b/src/IO.Ably.Xamarin.sln index b2be955a2..524f3490f 100644 --- a/src/IO.Ably.Xamarin.sln +++ b/src/IO.Ably.Xamarin.sln @@ -43,7 +43,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Push.Android", "IO. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Push.iOS", "IO.Ably.Push.iOS\IO.Ably.Push.iOS.csproj", "{E1A8FDE2-FEFC-403E-99A0-F13847B1495E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Tests.DotNetCore20", "IO.Ably.Tests.DotNetCore20\IO.Ably.Tests.DotNetCore20.csproj", "{9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Tests.NET6_NET7", "IO.Ably.Tests.NET6_NET7\IO.Ably.Tests.NET6_NET7.csproj", "{9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotnetPush", "..\examples\DotnetPush\DotnetPush\DotnetPush.csproj", "{E04ACB26-B65F-43CB-AC30-B6523A7B93C4}" EndProject diff --git a/src/IO.Ably.sln b/src/IO.Ably.sln index 9234b9465..fe4f62059 100644 --- a/src/IO.Ably.sln +++ b/src/IO.Ably.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28729.10 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31919.166 MinimumVisualStudioVersion = 15.0.26730.10 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1EA29F05-BF68-4BA8-A58F-C7C131E3FC62}" ProjectSection(SolutionItems) = preProject @@ -40,22 +40,13 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Shared.MsgPack", "I EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidSample", "..\examples\AndroidSample\AndroidSample.csproj", "{4F519937-3F75-49D7-A71E-79A6C798C5B8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IO.Ably.Tests.DotNetCore20", "IO.Ably.Tests.DotNetCore20\IO.Ably.Tests.DotNetCore20.csproj", "{4805A9DA-3412-4BE8-8B95-5A0EFDA1AC01}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IO.Ably.Tests.NET6_NET7", "IO.Ably.Tests.NET6_NET7\IO.Ably.Tests.NET6_NET7.csproj", "{4805A9DA-3412-4BE8-8B95-5A0EFDA1AC01}" EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Tests.Shared", "IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.shproj", "{1609F12C-8216-4E7C-ADE0-240BFE160242}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.DeltaCodec", "..\lib\delta-codec\IO.Ably.DeltaCodec\IO.Ably.DeltaCodec.csproj", "{412DEB5F-7936-4027-8BF8-977F23D465ED}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IO.Ably.DeltaCodec", "..\lib\delta-codec\IO.Ably.DeltaCodec\IO.Ably.DeltaCodec.csproj", "{412DEB5F-7936-4027-8BF8-977F23D465ED}" EndProject Global - GlobalSection(SharedMSBuildProjectFiles) = preSolution - IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.projitems*{1609f12c-8216-4e7c-ade0-240bfe160242}*SharedItemsImports = 13 - IO.Ably.Shared\IO.Ably.Shared.projitems*{24b6fc97-9d3d-46ae-b5cb-47458354bee1}*SharedItemsImports = 4 - IO.Ably.Shared\IO.Ably.Shared.projitems*{2d265650-b1ec-4f8d-b043-a2e3dcc23fd8}*SharedItemsImports = 4 - IO.Ably.Shared\IO.Ably.Shared.projitems*{3553e1b2-8f1f-4e83-9524-08e702c14fcf}*SharedItemsImports = 13 - IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.projitems*{567feef7-41af-42f2-ad34-546a278355b1}*SharedItemsImports = 4 - IO.Ably.Shared\IO.Ably.Shared.projitems*{8bb7b13c-e9f4-4d1b-bccc-af890a23ece6}*SharedItemsImports = 4 - IO.Ably.Shared.MsgPack\IO.Ably.Shared.MsgPack.projitems*{eebf3249-3ca3-4078-a188-f8b916c3f4c2}*SharedItemsImports = 13 - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|ARM = Debug|ARM @@ -223,4 +214,15 @@ Global GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F69D4156-FC22-4B8E-AD72-2A7323D42CC4} EndGlobalSection + GlobalSection(SharedMSBuildProjectFiles) = preSolution + IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.projitems*{1609f12c-8216-4e7c-ade0-240bfe160242}*SharedItemsImports = 13 + IO.Ably.Shared\IO.Ably.Shared.projitems*{24b6fc97-9d3d-46ae-b5cb-47458354bee1}*SharedItemsImports = 4 + IO.Ably.Shared\IO.Ably.Shared.projitems*{2d265650-b1ec-4f8d-b043-a2e3dcc23fd8}*SharedItemsImports = 4 + IO.Ably.Shared\IO.Ably.Shared.projitems*{3553e1b2-8f1f-4e83-9524-08e702c14fcf}*SharedItemsImports = 13 + IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.projitems*{4805a9da-3412-4be8-8b95-5a0efda1ac01}*SharedItemsImports = 5 + IO.Ably.Shared\IO.Ably.Shared.projitems*{48ea337f-ae7b-4001-bd8c-da1668fc6cbd}*SharedItemsImports = 5 + IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.projitems*{567feef7-41af-42f2-ad34-546a278355b1}*SharedItemsImports = 4 + IO.Ably.Shared\IO.Ably.Shared.projitems*{8bb7b13c-e9f4-4d1b-bccc-af890a23ece6}*SharedItemsImports = 4 + IO.Ably.Shared.MsgPack\IO.Ably.Shared.MsgPack.projitems*{eebf3249-3ca3-4078-a188-f8b916c3f4c2}*SharedItemsImports = 13 + EndGlobalSection EndGlobal From 4e40ff50cf6f3ea8183e54ca38c5735957af8d3e Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 17 Mar 2023 14:06:46 +0530 Subject: [PATCH 12/72] Update dotnet command to install fake tool from local manifest --- .github/workflows/integration-test-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test-linux.yml b/.github/workflows/integration-test-linux.yml index 75d06f2b3..c501dc659 100644 --- a/.github/workflows/integration-test-linux.yml +++ b/.github/workflows/integration-test-linux.yml @@ -23,7 +23,7 @@ jobs: 6.0.x 7.0.x - name: Download fake-cli - run: dotnet tool install fake-cli --version 5.20.4 --tool-path . + run: dotnet tool restore - name: Unit tests run: ./build.sh Test.NetStandard.Unit.WithRetry - name: Integration tests From bd0623fd5ee7a0b7846de80777643fdbb6f8cfd7 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 17 Mar 2023 14:52:09 +0530 Subject: [PATCH 13/72] Upgraded fake cli to 6.0.0, updated github workflow for the same --- .config/dotnet-tools.json | 2 +- .github/workflows/integration-test-macos.yml | 2 +- .github/workflows/integration-test-windows.yml | 2 +- .github/workflows/package.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 3dc104b04..5c089c004 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "fake-cli": { - "version": "5.20.3", + "version": "6.0.0", "commands": [ "fake" ] diff --git a/.github/workflows/integration-test-macos.yml b/.github/workflows/integration-test-macos.yml index 4be6c88c5..7916f9591 100644 --- a/.github/workflows/integration-test-macos.yml +++ b/.github/workflows/integration-test-macos.yml @@ -23,7 +23,7 @@ jobs: 6.0.x 7.0.x - name: Download fake-cli - run: dotnet tool install fake-cli --version 5.20.4 --tool-path . + run: dotnet tool restore - name: Restore packages run: | nuget restore ./src/IO.Ably.Xamarin.sln diff --git a/.github/workflows/integration-test-windows.yml b/.github/workflows/integration-test-windows.yml index d3edd6d5c..bf517090d 100644 --- a/.github/workflows/integration-test-windows.yml +++ b/.github/workflows/integration-test-windows.yml @@ -27,7 +27,7 @@ jobs: 6.0.x 7.0.x - name: Download fake-cli - run: dotnet tool install fake-cli --version 5.20.4 --tool-path . + run: dotnet tool restore - name: Unit tests run: ./build.cmd ${{ matrix.target }}.Unit - name: Integration tests diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 0a6c40cee..5c3a69e06 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -21,7 +21,7 @@ jobs: 6.0.x 7.0.x - name: Download fake-cli - run: dotnet tool install fake-cli --version 5.20.4 --tool-path . + run: dotnet tool restore - name: Package run: ./package.cmd ${{ github.event.inputs.version }} - name: Archive package From f6f433e33c6e23264ebe205fc5b921380ab82d5c Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 17 Mar 2023 14:56:24 +0530 Subject: [PATCH 14/72] Updated fake tool to latest major version of 5.x --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 5c089c004..bdec27fbe 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "fake-cli": { - "version": "6.0.0", + "version": "5.23.1", "commands": [ "fake" ] From cf7ee2635af4e90575962d2273188b3f41665329 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 17 Mar 2023 15:06:42 +0530 Subject: [PATCH 15/72] Updated dotnet tools, deleted old lock fsx lock file --- .config/dotnet-tools.json | 2 +- build.fsx.lock | 239 -------------------------------------- 2 files changed, 1 insertion(+), 240 deletions(-) delete mode 100644 build.fsx.lock diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index bdec27fbe..5c089c004 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "fake-cli": { - "version": "5.23.1", + "version": "6.0.0", "commands": [ "fake" ] diff --git a/build.fsx.lock b/build.fsx.lock deleted file mode 100644 index 39acd3cf2..000000000 --- a/build.fsx.lock +++ /dev/null @@ -1,239 +0,0 @@ -STORAGE: NONE -RESTRICTION: == netstandard2.0 -NUGET - remote: https://api.nuget.org/v3/index.json - BlackFox.VsWhere (1.1) - FSharp.Core (>= 4.2.3) - Microsoft.Win32.Registry (>= 4.7) - Fake.Core.CommandLineParsing (5.20.4) - FParsec (>= 1.1.1) - FSharp.Core (>= 4.7.2) - Fake.Core.Context (5.20.4) - FSharp.Core (>= 4.7.2) - Fake.Core.Environment (5.20.4) - FSharp.Core (>= 4.7.2) - Fake.Core.FakeVar (5.20.4) - Fake.Core.Context (>= 5.20.4) - FSharp.Core (>= 4.7.2) - Fake.Core.Process (5.20.4) - Fake.Core.Environment (>= 5.20.4) - Fake.Core.FakeVar (>= 5.20.4) - Fake.Core.String (>= 5.20.4) - Fake.Core.Trace (>= 5.20.4) - Fake.IO.FileSystem (>= 5.20.4) - FSharp.Core (>= 4.7.2) - System.Collections.Immutable (>= 1.7.1) - Fake.Core.SemVer (5.20.4) - FSharp.Core (>= 4.7.2) - Fake.Core.String (5.20.4) - FSharp.Core (>= 4.7.2) - Fake.Core.Target (5.20.4) - Fake.Core.CommandLineParsing (>= 5.20.4) - Fake.Core.Context (>= 5.20.4) - Fake.Core.Environment (>= 5.20.4) - Fake.Core.FakeVar (>= 5.20.4) - Fake.Core.Process (>= 5.20.4) - Fake.Core.String (>= 5.20.4) - Fake.Core.Trace (>= 5.20.4) - FSharp.Control.Reactive (>= 4.4.2) - FSharp.Core (>= 4.7.2) - Fake.Core.Tasks (5.20.4) - Fake.Core.Trace (>= 5.20.4) - FSharp.Core (>= 4.7.2) - Fake.Core.Trace (5.20.4) - Fake.Core.Environment (>= 5.20.4) - Fake.Core.FakeVar (>= 5.20.4) - FSharp.Core (>= 4.7.2) - Fake.Core.Xml (5.20.4) - Fake.Core.String (>= 5.20.4) - FSharp.Core (>= 4.7.2) - Fake.DotNet.AssemblyInfoFile (5.20.4) - Fake.Core.Environment (>= 5.20.4) - Fake.Core.String (>= 5.20.4) - Fake.Core.Trace (>= 5.20.4) - Fake.IO.FileSystem (>= 5.20.4) - FSharp.Core (>= 4.7.2) - Fake.DotNet.Cli (5.20.4) - Fake.Core.Environment (>= 5.20.4) - Fake.Core.Process (>= 5.20.4) - Fake.Core.String (>= 5.20.4) - Fake.Core.Trace (>= 5.20.4) - Fake.DotNet.MSBuild (>= 5.20.4) - Fake.DotNet.NuGet (>= 5.20.4) - Fake.IO.FileSystem (>= 5.20.4) - FSharp.Core (>= 4.7.2) - Mono.Posix.NETStandard (>= 1.0) - Newtonsoft.Json (>= 12.0.3) - Fake.DotNet.MSBuild (5.20.4) - BlackFox.VsWhere (>= 1.1) - Fake.Core.Environment (>= 5.20.4) - Fake.Core.Process (>= 5.20.4) - Fake.Core.String (>= 5.20.4) - Fake.Core.Trace (>= 5.20.4) - Fake.IO.FileSystem (>= 5.20.4) - FSharp.Core (>= 4.7.2) - MSBuild.StructuredLogger (>= 2.1.176) - Fake.DotNet.NuGet (5.20.4) - Fake.Core.Environment (>= 5.20.4) - Fake.Core.Process (>= 5.20.4) - Fake.Core.SemVer (>= 5.20.4) - Fake.Core.String (>= 5.20.4) - Fake.Core.Tasks (>= 5.20.4) - Fake.Core.Trace (>= 5.20.4) - Fake.Core.Xml (>= 5.20.4) - Fake.IO.FileSystem (>= 5.20.4) - Fake.Net.Http (>= 5.20.4) - FSharp.Core (>= 4.7.2) - Newtonsoft.Json (>= 12.0.3) - NuGet.Protocol (>= 5.6) - Fake.DotNet.Testing.XUnit2 (5.20.4) - Fake.Core.Process (>= 5.20.4) - Fake.Core.String (>= 5.20.4) - Fake.Core.Trace (>= 5.20.4) - Fake.IO.FileSystem (>= 5.20.4) - Fake.Testing.Common (>= 5.20.4) - FSharp.Core (>= 4.7.2) - Fake.IO.FileSystem (5.20.4) - Fake.Core.String (>= 5.20.4) - FSharp.Core (>= 4.7.2) - Fake.Net.Http (5.20.4) - Fake.Core.Trace (>= 5.20.4) - FSharp.Core (>= 4.7.2) - Fake.Testing.Common (5.20.4) - Fake.Core.Trace (>= 5.20.4) - FSharp.Core (>= 4.7.2) - FParsec (1.1.1) - FSharp.Core (>= 4.3.4) - FSharp.Control.Reactive (5.0.2) - FSharp.Core (>= 4.7.2) - System.Reactive (>= 5.0) - FSharp.Core (5.0.1) - Microsoft.Bcl.AsyncInterfaces (5.0) - System.Threading.Tasks.Extensions (>= 4.5.4) - Microsoft.Build (16.10) - Microsoft.Build.Framework (>= 16.10) - Microsoft.NET.StringTools (>= 1.0) - Microsoft.Win32.Registry (>= 4.3) - System.Collections.Immutable (>= 5.0) - System.Configuration.ConfigurationManager (>= 4.7) - System.Reflection.Metadata (>= 1.6) - System.Security.Principal.Windows (>= 4.7) - System.Text.Encoding.CodePages (>= 4.0.1) - System.Text.Json (>= 4.7) - System.Threading.Tasks.Dataflow (>= 4.9) - Microsoft.Build.Framework (16.10) - System.Security.Permissions (>= 4.7) - Microsoft.Build.Tasks.Core (16.10) - Microsoft.Build.Framework (>= 16.10) - Microsoft.Build.Utilities.Core (>= 16.10) - Microsoft.NET.StringTools (>= 1.0) - Microsoft.Win32.Registry (>= 4.3) - System.CodeDom (>= 4.4) - System.Collections.Immutable (>= 5.0) - System.Reflection.Metadata (>= 1.6) - System.Resources.Extensions (>= 4.6) - System.Security.Cryptography.Pkcs (>= 4.7) - System.Security.Cryptography.Xml (>= 4.7) - System.Security.Permissions (>= 4.7) - System.Threading.Tasks.Dataflow (>= 4.9) - Microsoft.Build.Utilities.Core (16.10) - Microsoft.Build.Framework (>= 16.10) - Microsoft.NET.StringTools (>= 1.0) - Microsoft.Win32.Registry (>= 4.3) - System.Collections.Immutable (>= 5.0) - System.Configuration.ConfigurationManager (>= 4.7) - System.Security.Permissions (>= 4.7) - System.Text.Encoding.CodePages (>= 4.0.1) - Microsoft.NET.StringTools (1.0) - System.Memory (>= 4.5.4) - System.Runtime.CompilerServices.Unsafe (>= 5.0) - Microsoft.NETCore.Platforms (5.0.2) - Microsoft.NETCore.Targets (5.0) - Microsoft.Win32.Registry (5.0) - System.Buffers (>= 4.5.1) - System.Memory (>= 4.5.4) - System.Security.AccessControl (>= 5.0) - System.Security.Principal.Windows (>= 5.0) - Mono.Posix.NETStandard (1.0) - MSBuild.StructuredLogger (2.1.507) - Microsoft.Build (>= 16.4) - Microsoft.Build.Framework (>= 16.4) - Microsoft.Build.Tasks.Core (>= 16.4) - Microsoft.Build.Utilities.Core (>= 16.4) - Newtonsoft.Json (13.0.1) - NuGet.Common (5.9.1) - NuGet.Frameworks (>= 5.9.1) - NuGet.Configuration (5.9.1) - NuGet.Common (>= 5.9.1) - System.Security.Cryptography.ProtectedData (>= 4.4) - NuGet.Frameworks (5.9.1) - NuGet.Packaging (5.9.1) - Newtonsoft.Json (>= 9.0.1) - NuGet.Configuration (>= 5.9.1) - NuGet.Versioning (>= 5.9.1) - System.Security.Cryptography.Cng (>= 5.0) - System.Security.Cryptography.Pkcs (>= 5.0) - NuGet.Protocol (5.9.1) - NuGet.Packaging (>= 5.9.1) - NuGet.Versioning (5.9.1) - System.Buffers (4.5.1) - System.CodeDom (5.0) - System.Collections.Immutable (5.0) - System.Memory (>= 4.5.4) - System.Configuration.ConfigurationManager (5.0) - System.Security.Cryptography.ProtectedData (>= 5.0) - System.Security.Permissions (>= 5.0) - System.Formats.Asn1 (5.0) - System.Buffers (>= 4.5.1) - System.Memory (>= 4.5.4) - System.Memory (4.5.4) - System.Buffers (>= 4.5.1) - System.Numerics.Vectors (>= 4.4) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - System.Numerics.Vectors (4.5) - System.Reactive (5.0) - System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - System.Threading.Tasks.Extensions (>= 4.5.4) - System.Reflection.Metadata (5.0) - System.Collections.Immutable (>= 5.0) - System.Resources.Extensions (5.0) - System.Memory (>= 4.5.4) - System.Runtime (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - System.Runtime.CompilerServices.Unsafe (5.0) - System.Runtime.InteropServices.WindowsRuntime (4.3) - System.Runtime (>= 4.3) - System.Security.AccessControl (5.0) - System.Security.Principal.Windows (>= 5.0) - System.Security.Cryptography.Cng (5.0) - System.Security.Cryptography.Pkcs (5.0.1) - System.Buffers (>= 4.5.1) - System.Formats.Asn1 (>= 5.0) - System.Memory (>= 4.5.4) - System.Security.Cryptography.Cng (>= 5.0) - System.Security.Cryptography.ProtectedData (5.0) - System.Memory (>= 4.5.4) - System.Security.Cryptography.Xml (5.0) - System.Memory (>= 4.5.4) - System.Security.Cryptography.Pkcs (>= 5.0) - System.Security.Permissions (>= 5.0) - System.Security.Permissions (5.0) - System.Security.AccessControl (>= 5.0) - System.Security.Principal.Windows (5.0) - System.Text.Encoding.CodePages (5.0) - System.Runtime.CompilerServices.Unsafe (>= 5.0) - System.Text.Encodings.Web (5.0.1) - System.Buffers (>= 4.5.1) - System.Memory (>= 4.5.4) - System.Text.Json (5.0.2) - Microsoft.Bcl.AsyncInterfaces (>= 5.0) - System.Buffers (>= 4.5.1) - System.Memory (>= 4.5.4) - System.Numerics.Vectors (>= 4.5) - System.Runtime.CompilerServices.Unsafe (>= 5.0) - System.Text.Encodings.Web (>= 5.0.1) - System.Threading.Tasks.Extensions (>= 4.5.4) - System.Threading.Tasks.Dataflow (5.0) - System.Threading.Tasks.Extensions (4.5.4) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) From 0c194515a737713a81b324d59444281fa90c9281 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 19 Mar 2023 23:25:45 +0530 Subject: [PATCH 16/72] Simplified naming convention for net6/net7 test project --- build.fsx | 4 ++-- src/IO.Ably.NETStandard20/Properties/AssemblyInfo.cs | 2 +- src/IO.Ably.NetStandard.sln | 2 +- .../IO.Ably.Tests.DotNET.csproj} | 0 .../MsgPackStatsTest.json | 0 .../StatsFixture.json | 0 .../StatsInterval.json | 0 .../xunit.runner.json | 0 src/IO.Ably.Xamarin.sln | 2 +- src/IO.Ably.sln | 2 +- 10 files changed, 6 insertions(+), 6 deletions(-) rename src/{IO.Ably.Tests.NET6_NET7/IO.Ably.Tests.NET6_NET7.csproj => IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj} (100%) rename src/{IO.Ably.Tests.NET6_NET7 => IO.Ably.Tests.DotNET}/MsgPackStatsTest.json (100%) rename src/{IO.Ably.Tests.NET6_NET7 => IO.Ably.Tests.DotNET}/StatsFixture.json (100%) rename src/{IO.Ably.Tests.NET6_NET7 => IO.Ably.Tests.DotNET}/StatsInterval.json (100%) rename src/{IO.Ably.Tests.NET6_NET7 => IO.Ably.Tests.DotNET}/xunit.runner.json (100%) diff --git a/build.fsx b/build.fsx index 3556e0889..8c049d1d6 100644 --- a/build.fsx +++ b/build.fsx @@ -31,7 +31,7 @@ open Fake.DotNet.NuGet open System.Text.RegularExpressions let currentDir = __SOURCE_DIRECTORY__ -let netstandardTestDir = "src/IO.Ably.Tests.NET6_NET7" +let netstandardTestDir = "src/IO.Ably.Tests.DotNET" let xUnit2 = XUnit2.run let NetStandardSolution = "src/IO.Ably.NetStandard.sln" @@ -218,7 +218,7 @@ let findFailedDotnetTestTests (resultsPath:string) = let runStandardTestsWithOptions testToRun (failOnError:bool) = Directory.ensure testResultsDir Trace.log " --- Testing net core version --- " - let project = Path.combine currentDir "src/IO.Ably.Tests.NET6_NET7/IO.Ably.Tests.NET6_NET7.csproj" + let project = Path.combine currentDir "src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj" match testToRun with | Method testMethodName -> diff --git a/src/IO.Ably.NETStandard20/Properties/AssemblyInfo.cs b/src/IO.Ably.NETStandard20/Properties/AssemblyInfo.cs index 22f7c2c66..4b459f0d7 100644 --- a/src/IO.Ably.NETStandard20/Properties/AssemblyInfo.cs +++ b/src/IO.Ably.NETStandard20/Properties/AssemblyInfo.cs @@ -12,7 +12,7 @@ [assembly: InternalsVisibleTo("IO.Ably.Push.Android, PublicKey=002400000480000094000000060200000024000052534131000400000100010001394bb0af9eb8e04f43676c91691de20f2137847e153e27bb96cf2dedf43bce3073f699ca136fb7f9eea0d9b9c6748e9c0be5543761945e101062f8770129512c4c397a08c1b459357e7a49a4dfd7e16ac9c84d1ab3fe1177b3e7741ea10eba746433691bbf1ad643bdf25bcf397a384f96e8d138b129bdb663189200d33dcf")] [assembly: InternalsVisibleTo("IO.Ably.Push.iOS, PublicKey=002400000480000094000000060200000024000052534131000400000100010001394bb0af9eb8e04f43676c91691de20f2137847e153e27bb96cf2dedf43bce3073f699ca136fb7f9eea0d9b9c6748e9c0be5543761945e101062f8770129512c4c397a08c1b459357e7a49a4dfd7e16ac9c84d1ab3fe1177b3e7741ea10eba746433691bbf1ad643bdf25bcf397a384f96e8d138b129bdb663189200d33dcf")] #if !PACKAGE -[assembly: InternalsVisibleTo("IO.Ably.Tests.NET6_NET7")] +[assembly: InternalsVisibleTo("IO.Ably.Tests.DotNET")] [assembly: InternalsVisibleTo("Unity.Assets.Tests.AblySandbox")] [assembly: InternalsVisibleTo("Unity.Assets.Tests.EditMode")] [assembly: InternalsVisibleTo("Unity.Assets.Tests.PlayMode")] diff --git a/src/IO.Ably.NetStandard.sln b/src/IO.Ably.NetStandard.sln index 11fe4f2e5..9ceaf9a9a 100644 --- a/src/IO.Ably.NetStandard.sln +++ b/src/IO.Ably.NetStandard.sln @@ -29,7 +29,7 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Shared", "IO.Ably.S EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Shared.MsgPack", "IO.Ably.Shared.MsgPack\IO.Ably.Shared.MsgPack.shproj", "{EEBF3249-3CA3-4078-A188-F8B916C3F4C2}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IO.Ably.Tests.NET6_NET7", "IO.Ably.Tests.NET6_NET7\IO.Ably.Tests.NET6_NET7.csproj", "{4805A9DA-3412-4BE8-8B95-5A0EFDA1AC01}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IO.Ably.Tests.DotNET", "IO.Ably.Tests.DotNET\IO.Ably.Tests.DotNET.csproj", "{4805A9DA-3412-4BE8-8B95-5A0EFDA1AC01}" EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Tests.Shared", "IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.shproj", "{1609F12C-8216-4E7C-ADE0-240BFE160242}" EndProject diff --git a/src/IO.Ably.Tests.NET6_NET7/IO.Ably.Tests.NET6_NET7.csproj b/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj similarity index 100% rename from src/IO.Ably.Tests.NET6_NET7/IO.Ably.Tests.NET6_NET7.csproj rename to src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj diff --git a/src/IO.Ably.Tests.NET6_NET7/MsgPackStatsTest.json b/src/IO.Ably.Tests.DotNET/MsgPackStatsTest.json similarity index 100% rename from src/IO.Ably.Tests.NET6_NET7/MsgPackStatsTest.json rename to src/IO.Ably.Tests.DotNET/MsgPackStatsTest.json diff --git a/src/IO.Ably.Tests.NET6_NET7/StatsFixture.json b/src/IO.Ably.Tests.DotNET/StatsFixture.json similarity index 100% rename from src/IO.Ably.Tests.NET6_NET7/StatsFixture.json rename to src/IO.Ably.Tests.DotNET/StatsFixture.json diff --git a/src/IO.Ably.Tests.NET6_NET7/StatsInterval.json b/src/IO.Ably.Tests.DotNET/StatsInterval.json similarity index 100% rename from src/IO.Ably.Tests.NET6_NET7/StatsInterval.json rename to src/IO.Ably.Tests.DotNET/StatsInterval.json diff --git a/src/IO.Ably.Tests.NET6_NET7/xunit.runner.json b/src/IO.Ably.Tests.DotNET/xunit.runner.json similarity index 100% rename from src/IO.Ably.Tests.NET6_NET7/xunit.runner.json rename to src/IO.Ably.Tests.DotNET/xunit.runner.json diff --git a/src/IO.Ably.Xamarin.sln b/src/IO.Ably.Xamarin.sln index 524f3490f..978539a8c 100644 --- a/src/IO.Ably.Xamarin.sln +++ b/src/IO.Ably.Xamarin.sln @@ -43,7 +43,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Push.Android", "IO. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Push.iOS", "IO.Ably.Push.iOS\IO.Ably.Push.iOS.csproj", "{E1A8FDE2-FEFC-403E-99A0-F13847B1495E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Tests.NET6_NET7", "IO.Ably.Tests.NET6_NET7\IO.Ably.Tests.NET6_NET7.csproj", "{9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Tests.DotNET", "IO.Ably.Tests.DotNET\IO.Ably.Tests.DotNET.csproj", "{9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotnetPush", "..\examples\DotnetPush\DotnetPush\DotnetPush.csproj", "{E04ACB26-B65F-43CB-AC30-B6523A7B93C4}" EndProject diff --git a/src/IO.Ably.sln b/src/IO.Ably.sln index fe4f62059..05d848f0f 100644 --- a/src/IO.Ably.sln +++ b/src/IO.Ably.sln @@ -40,7 +40,7 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Shared.MsgPack", "I EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidSample", "..\examples\AndroidSample\AndroidSample.csproj", "{4F519937-3F75-49D7-A71E-79A6C798C5B8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IO.Ably.Tests.NET6_NET7", "IO.Ably.Tests.NET6_NET7\IO.Ably.Tests.NET6_NET7.csproj", "{4805A9DA-3412-4BE8-8B95-5A0EFDA1AC01}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IO.Ably.Tests.DotNET", "IO.Ably.Tests.DotNET\IO.Ably.Tests.DotNET.csproj", "{4805A9DA-3412-4BE8-8B95-5A0EFDA1AC01}" EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Tests.Shared", "IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.shproj", "{1609F12C-8216-4E7C-ADE0-240BFE160242}" EndProject From c2ea93d4f64683c3e2b3b09b931ab2cdb90e49b3 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 19 Mar 2023 23:26:35 +0530 Subject: [PATCH 17/72] Updated global.json to support latest version of SDK --- global.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 global.json diff --git a/global.json b/global.json new file mode 100644 index 000000000..0f050ba53 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "6.0.300", + "rollForward": "latestMajor" + } +} From a23be398e2b4acce00e6120536f78d3a958859ae Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Mon, 20 Mar 2023 16:31:51 +0530 Subject: [PATCH 18/72] Created a separate project for fake scripts, moved build.fsx to the project --- .config/dotnet-tools.json | 8 +- build-script/.paket/Paket.Restore.targets | 557 ++++++++++++++++++++++ build-script/build-script.fsproj | 15 + build-script/build.fs | 548 +++++++++++++++++++++ build-script/paket.dependencies | 10 + build-script/paket.lock | 205 ++++++++ build-script/paket.references | 6 + build.cmd | 2 +- build.sh | 4 +- 9 files changed, 1348 insertions(+), 7 deletions(-) create mode 100644 build-script/.paket/Paket.Restore.targets create mode 100644 build-script/build-script.fsproj create mode 100644 build-script/build.fs create mode 100644 build-script/paket.dependencies create mode 100644 build-script/paket.lock create mode 100644 build-script/paket.references diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 5c089c004..c3c6e6c57 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -2,11 +2,11 @@ "version": 1, "isRoot": true, "tools": { - "fake-cli": { - "version": "6.0.0", + "paket": { + "version": "7.2.0", "commands": [ - "fake" + "paket" ] } } -} \ No newline at end of file +} diff --git a/build-script/.paket/Paket.Restore.targets b/build-script/.paket/Paket.Restore.targets new file mode 100644 index 000000000..4deb15bcd --- /dev/null +++ b/build-script/.paket/Paket.Restore.targets @@ -0,0 +1,557 @@ + + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + $(MSBuildVersion) + 15.0.0 + false + true + + true + $(MSBuildThisFileDirectory) + $(MSBuildThisFileDirectory)..\ + $(PaketRootPath)paket-files\paket.restore.cached + $(PaketRootPath)paket.lock + classic + proj + assembly + native + /Library/Frameworks/Mono.framework/Commands/mono + mono + + + $(PaketRootPath)paket.bootstrapper.exe + $(PaketToolsPath)paket.bootstrapper.exe + $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ + + "$(PaketBootStrapperExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" + + + + + true + true + + + True + + + False + + $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) + + + + + + + + + $(PaketRootPath)paket + $(PaketToolsPath)paket + + + + + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + + + + + + <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json")) + <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"')) + <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false + + + + + + + + + + + <_PaketCommand>dotnet paket + + + + + + $(PaketToolsPath)paket + $(PaketBootStrapperExeDir)paket + + + paket + + + + + <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)" + + + + + + + + + + + + + + + + + + + + + true + $(NoWarn);NU1603;NU1604;NU1605;NU1608 + false + true + + + + + + + + + $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) + + + + + + + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``)) + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``)) + + + + + %(PaketRestoreCachedKeyValue.Value) + %(PaketRestoreCachedKeyValue.Value) + + + + + true + false + true + + + + + true + + + + + + + + + + + + + + + + + + + $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached + + $(MSBuildProjectFullPath).paket.references + + $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references + + $(MSBuildProjectDirectory)\paket.references + + false + true + true + references-file-or-cache-not-found + + + + + $([System.IO.File]::ReadAllText('$(PaketReferencesCachedFilePath)')) + $([System.IO.File]::ReadAllText('$(PaketOriginalReferencesFilePath)')) + references-file + false + + + + + false + + + + + true + target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths) + + + + + + + + + + + false + true + + + + + + + + + + + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7]) + + + %(PaketReferencesFileLinesInfo.PackageVersion) + All + runtime + $(ExcludeAssets);contentFiles + $(ExcludeAssets);build;buildMultitargeting;buildTransitive + true + true + + + + + $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools + + + + + + + + + $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0]) + $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1]) + + + %(PaketCliToolFileLinesInfo.PackageVersion) + + + + + + + + + + false + + + + + + <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/> + + + + + + $(MSBuildProjectDirectory)/$(MSBuildProjectFile) + true + false + true + false + true + false + true + false + true + false + true + $(PaketIntermediateOutputPath)\$(Configuration) + $(PaketIntermediateOutputPath) + + + + <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/> + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build-script/build-script.fsproj b/build-script/build-script.fsproj new file mode 100644 index 000000000..500bbadd7 --- /dev/null +++ b/build-script/build-script.fsproj @@ -0,0 +1,15 @@ + + + + Exe + net6.0 + build_script + 3390;$(WarnOn) + 0020 + false + + + + + + diff --git a/build-script/build.fs b/build-script/build.fs new file mode 100644 index 000000000..e39c69482 --- /dev/null +++ b/build-script/build.fs @@ -0,0 +1,548 @@ +open Fake.Core.TargetOperators +open Fake.Core.Operators +open Fake.Core +open Fake.IO.Globbing.Operators +open Fake.DotNet +open Fake.IO +open Fake +open System +open Fake.DotNet.Testing +open Fake.DotNet.Testing.XUnit2 +open System.Xml.Linq +open System.Xml.XPath +open FSharp.Core +open Fake.Testing.Common +open Fake.DotNet.NuGet +open System.Text.RegularExpressions + +let currentDir = __SOURCE_DIRECTORY__ +let netstandardTestDir = "src/IO.Ably.Tests.DotNET" +let xUnit2 = XUnit2.run + +let NetStandardSolution = "src/IO.Ably.NetStandard.sln" +let NetFrameworkSolution = "src/IO.Ably.NetFramework.sln" +let XamarinSolution = "src/IO.Ably.Xamarin.sln" +let buildDir = Path.combine currentDir "build" +let srcDir = Path.combine currentDir "src" +let testResultsDir = Path.combine buildDir "tests" +let packageDir = Path.combine buildDir "package" +let configuration = DotNet.Release +let packageSolution = "src/IO.Ably.Package.sln" +let pushPackageSolution = "src/IO.Ably.PackagePush.sln" +let buildMode = Environment.environVarOrDefault "buildMode" "Release" +type TestRun = + | Method of string + | UnitTests + | IntegrationTests +let cli = """ +Usage: + prog [options] + +Options: + -t Target + -v Version +""" + +let initTargets1 (argv) = + + + // retrieve the fake 5 context information + // let ctx = Context.forceFakeContext () + // get the arguments + // let args = ctx.Arguments + let parser = Docopt(cli) + //let parsedArguments = parser.Parse(args |> List.toArray) + + let parsedArguments = parser.Parse(argv) + + let version = match DocoptResult.tryGetArgument "-v" parsedArguments with + | None -> "" + | Some version -> version + + let mergeJsonNet path outputPath = + let target = Path.combine path "IO.Ably.dll" + let docsFile = Path.combine path "IO.Ably.xml" + let out = Path.combine outputPath "IO.Ably.dll" + + Directory.ensure outputPath + + CreateProcess.fromRawCommand "./tools/ilrepack.exe" + [ + "/lib:" + path + "/targetplatform:v4" + "/internalize" + "/attr:" + target + "/keyfile:IO.Ably.snk" + "/parallel" + "/out:" + out + target + Path.combine path "Newtonsoft.Json.dll" + ] + |> Proc.run // start with the above configuration + |> ignore + + // Copy the xml docs + if File.exists docsFile then Shell.copy outputPath [ docsFile ] + + + // *** Define Targets *** + Target.create "Clean" (fun _ -> + Trace.log (sprintf "Current dir: %s" currentDir) + Trace.log " --- Removing build folder ---" + Directory.delete(buildDir) + Directory.delete(packageDir) + + Directory.ensure testResultsDir + Directory.ensure packageDir + ) + + Target.create "Version" (fun _ -> + AssemblyInfoFile.createCSharp "./src/CommonAssemblyInfo.cs" + [ + AssemblyInfo.Company "Ably" + AssemblyInfo.Product "Ably .NET Library" + AssemblyInfo.Version version + AssemblyInfo.FileVersion version + ] + ) + + + let nugetRestore solutionFile = + CreateProcess.fromRawCommand "./tools/nuget.exe" ["restore"; solutionFile] + |> Proc.run // start with the above configuration + + Target.create "Restore" (fun _ -> + if Environment.isWindows then + nugetRestore "src/IO.Ably.sln" |> ignore + + CreateProcess.fromRawCommand "dotnet" ["restore"; "src/IO.Ably.sln"] + |> Proc.run |> ignore + ) + + Target.create "Restore Xamarin" (fun _ -> + + if not Environment.isWindows then + CreateProcess.fromRawCommand "ls" ["../packages"] |> Proc.run |> ignore + + let setParams (defaults:MSBuildParams) = + { defaults with + Verbosity = Some(Quiet) + Targets = ["Restore"] + Properties = + [ + "Configuration", buildMode + "RestorePackages", "True" + ] + } + MSBuild.build setParams NetFrameworkSolution + + + ) + + Target.create "NetFramework - Build" (fun _ -> + let setParams (defaults:MSBuildParams) = + { defaults with + Verbosity = Some(Quiet) + Targets = ["Build"] + Properties = + [ + "Optimize", "True" + "DebugSymbols", "True" + "Configuration", buildMode + ] + } + MSBuild.build setParams NetFrameworkSolution + ) + + Target.create "Xamarin - Build" (fun _ -> + let setParams (defaults:MSBuildParams) = + { defaults with + Verbosity = Some(Quiet) + Targets = ["Build"] + Properties = + [ + "Optimize", "True" + "DebugSymbols", "True" + "Configuration", buildMode + ] + } + MSBuild.build setParams XamarinSolution + ) + + let findNextTrxTestPath (resultsPath:string) = + [ 1 .. 100 ] + |> Seq.map ( fun i -> resultsPath.Replace(".trx", sprintf "-%d.trx" i)) + |> Seq.find (File.exists >> not) + + let findNextTestPath (resultsPath:string) = + [ 1 .. 100 ] + |> Seq.map ( fun i -> resultsPath.Replace(".xml", sprintf "-%d.xml" i)) + |> Seq.find (File.exists >> not) + + let trimTestMethod (testMethod:string) = + match testMethod.Contains("(") with + | true -> testMethod.Substring(0, testMethod.IndexOf("(")) + | false -> testMethod + + let findFailedXUnitTests (resultsPath:string) = + let doc = XDocument.Load(resultsPath) + let nodes = doc.XPathSelectElements("//test-case[@success='False']") + + nodes + |> Seq.map (fun node -> (node.Attribute(XName.Get("name"))).Value) + |> Seq.map trimTestMethod + + let findFailedDotnetTestTests (resultsPath:string) = + let xml = File.readAsString resultsPath + let tidyXml = Regex.Replace(xml, @"xmlns=\""[^\""]+\""", "") // Remove the namespace to make xpath queries easier + let doc = XDocument.Parse(tidyXml); + let nodes = doc.XPathSelectElements("//UnitTestResult[@outcome='Failed']") + printfn "Nodes found: %d" (nodes |> Seq.length) + + nodes + |> Seq.map (fun node -> (node.Attribute(XName.Get("testName"))).Value) + |> Seq.map trimTestMethod + |> Seq.toList + + let runStandardTestsWithOptions testToRun (failOnError:bool) = + Directory.ensure testResultsDir + Trace.log " --- Testing net core version --- " + let project = Path.combine currentDir "src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj" + + match testToRun with + | Method testMethodName -> + let logsPath = findNextTrxTestPath(Path.combine testResultsDir "tests-netstandard.trx") + DotNet.test (fun opts -> { opts with Configuration = configuration + Filter = Some testMethodName + Logger = Some( "trx;logfilename=" + logsPath) + }) + project + logsPath + | UnitTests -> + let logsPath = Path.combine testResultsDir "tests-netstandard-unit.trx" + let mutable filters = [ "type!=integration" ] + if Environment.isLinux then filters <- filters @ ["linux!=skip"] + + try + DotNet.test (fun opts -> { opts with Configuration = configuration + Filter = Some (filters |> String.concat "&") + Logger = Some( "trx;logfilename=" + logsPath) + }) + project + with + | :? Fake.DotNet.MSBuildException -> + printfn "Not all unit tests passed. FailOnError is %b" failOnError |> ignore + if failOnError then reraise() + + logsPath + | IntegrationTests -> + let logsPath = Path.combine testResultsDir "tests-netstandard-integration.trx" + try + DotNet.test (fun opts -> { opts with Configuration = configuration + Filter = Some ("type=integration") + Logger = Some( "trx;logfilename=" + logsPath) + }) + project + with + | :? Fake.DotNet.MSBuildException -> + printfn "Not all integration tests passed the first time" + if failOnError then reraise() + + + logsPath + + let runStandardTests testToRun = + runStandardTestsWithOptions testToRun true + + let runStandardTestsAllowRetry testToRun = + runStandardTestsWithOptions testToRun false + + let runFrameworkTests testToRun errorLevel = + Directory.ensure testResultsDir + let testDir = Path.combine currentDir "src/IO.Ably.Tests.NETFramework/bin/Release" + let testDll = !! (Path.combine testDir "*.Tests.*.dll") + + match testToRun with + | Method testMethodName -> + let logsPath = findNextTestPath(Path.combine testResultsDir "xunit-netframework.xml") + testDll + |> xUnit2 (fun p -> { p with NUnitXmlOutputPath = Some ( logsPath) + Method = Some (trimTestMethod testMethodName) + ErrorLevel = errorLevel + }) + logsPath + | UnitTests -> + let logsPath = Path.combine testResultsDir "xunit-netframework-unit.xml" + testDll + |> xUnit2 (fun p -> { p with NUnitXmlOutputPath = Some logsPath + ExcludeTraits = [ ("type", "integration")] + ErrorLevel = errorLevel + }) + logsPath + | IntegrationTests -> + let logsPath = Path.combine testResultsDir "xunit-netframework-integration.xml" + testDll + |> xUnit2 (fun p -> { p with NUnitXmlOutputPath = Some logsPath + IncludeTraits = [ ("type", "integration")] + TimeOut = TimeSpan.FromMinutes(20.) + Parallel = ParallelMode.Collections + ErrorLevel = errorLevel + }) + logsPath + + Target.create "NetFramework.Integration.Rerun" (fun _ -> + + let setParams (defaults:MSBuildParams) = + { defaults with + Verbosity = Some(Quiet) + Targets = ["Build"] + Properties = + [ + "Optimize", "True" + "DebugSymbols", "True" + "Configuration", buildMode + ] + } + MSBuild.build setParams NetFrameworkSolution + + + let logsPath = Path.combine testResultsDir "xunit-netframework-integration.xml" + + let failedTestNames = findFailedXUnitTests logsPath + + for test in failedTestNames do + runFrameworkTests (Method test) TestRunnerErrorLevel.Error |> ignore + ) + + Target.create "NetFramework - Unit Tests" (fun _ -> + + runFrameworkTests UnitTests TestRunnerErrorLevel.Error |> ignore + ) + + Target.create "NetFramework - Integration Tests" ( fun _ -> + + let logs = runFrameworkTests IntegrationTests TestRunnerErrorLevel.DontFailBuild + + let failedTestNames = findFailedXUnitTests logs + + for test in failedTestNames do + runFrameworkTests (Method test) TestRunnerErrorLevel.Error |> ignore + ) + + Target.create "NetStandard - Build" (fun _ -> + DotNet.build (fun opts -> { + opts with Configuration = configuration + }) NetStandardSolution + ) + + Target.create "NetStandard - Unit Tests" (fun _ -> + runStandardTests UnitTests |> ignore + ) + + Target.create "NetStandard - Unit Tests with retry" (fun _ -> + let logs = runStandardTestsAllowRetry UnitTests + + let failedTestNames = findFailedDotnetTestTests logs + + for test in failedTestNames do + runStandardTests (Method test) |> ignore + ) + + Target.create "NetStandard - Integration Tests" (fun _ -> + + let logs = runStandardTestsAllowRetry IntegrationTests + + let failedTestNames = findFailedDotnetTestTests logs + + for test in failedTestNames do + runStandardTests (Method test) |> ignore + ) + + // This is duplicated before of Fake's build dependency doesn't allow + // This this target to be run independent of the unit tests + Target.create "NetStandard - Integration Tests with retry" (fun _ -> + + let logs = runStandardTestsAllowRetry IntegrationTests + + let failedTestNames = findFailedDotnetTestTests logs + + for test in failedTestNames do + runStandardTests (Method test) |> ignore + ) + + Target.create "Package - Build All" (fun _ -> + let setParams (defaults:MSBuildParams) = + { defaults with + Verbosity = Some(Quiet) + Targets = ["Build"] + Properties = + [ + "Optimize", "True" + "DebugSymbols", "True" + "Configuration", buildMode + "StyleCopEnabled", "True" + "Package", "True" + "DefineConstants", "PACKAGE" + ] + } + MSBuild.build setParams packageSolution + ) + + Target.create "Push Package - Build All" (fun _ -> + let setParams (defaults:MSBuildParams) = + { defaults with + Verbosity = Some(Quiet) + Targets = ["Build"] + Properties = + [ + "Optimize", "True" + "DebugSymbols", "True" + "Configuration", "Package" + "StyleCopEnabled", "True" + "Package", "True" + "DefineConstants", "PACKAGE" + ] + } + MSBuild.build setParams pushPackageSolution + ) + + Target.create "Package - Merge json.net" (fun _ -> + let projectsToMerge = [ "IO.Ably.Android"; "IO.Ably.iOS"; "IO.Ably.NETFramework" ] + let binFolderPaths = projectsToMerge + |> Seq.map (Path.combine "src") + |> Seq.map (fun path -> sprintf "%s/bin/%s" path buildMode) + + // Copy all IO.Ably* files to the `packaged folder` + binFolderPaths + |> Seq.iter ( fun path -> !! (Path.combine path "IO.Ably*") |> Shell.copy (Path.combine path "packaged")) + + // Merge newtonsoft json into ably.dll and overwrite IO.Ably.dll in the packaged folder with the merged one + binFolderPaths + |> Seq.iter ( fun path -> mergeJsonNet path (Path.combine path "packaged")) + + ) + + Target.create "Package - Create nuget" (fun _ -> + CreateProcess.fromRawCommand "./tools/nuget.exe" + [ + "pack" + "./nuget/io.ably.nuspec" + "-properties" + sprintf "version=%s;configuration=Release" version + ] + |> Proc.run // start with the above configuration + |> ignore + ) + + Target.create "Package - Push" (fun _ -> + CreateProcess.fromRawCommand "nuget" + [ + "pack" + "./nuget/io.ably.push.android.nuspec" + "-properties" + sprintf "version=%s;configuration=Release" version + ] + |> Proc.run // start with the above configuration + |> ignore + + CreateProcess.fromRawCommand "nuget" + [ + "pack" + "./nuget/io.ably.push.ios.nuspec" + "-properties" + sprintf "version=%s;configuration=Release" version + ] + |> Proc.run // start with the above configuration + |> ignore + ) + + Target.create "Prepare" ignore + Target.create "Build.NetFramework" ignore + Target.create "Build.NetStandard" ignore + Target.create "Build.Xamarin" ignore + + Target.create "Test.NetFramework.Unit" ignore + Target.create "Test.NetFramework.Integration" ignore + + Target.create "Test.NetStandard.Unit" ignore + Target.create "Test.NetStandard.Unit.WithRetry" ignore + Target.create "Test.NetStandard.Integration.WithRetry" ignore + Target.create "Test.NetStandard.Integration" ignore + + Target.create "Package" ignore + Target.create "PushPackage" ignore + + + + "Clean" + ==> "Restore" + ==> "Prepare" + + "Prepare" + ==> "NetFramework - Build" + ==> "Build.NetFramework" + + "Prepare" + ==> "Restore Xamarin" + ==> "Xamarin - Build" + ==> "Build.Xamarin" + + "Prepare" + ==> "NetStandard - Build" + ==> "Build.NetStandard" + + "Prepare" + ==> "Version" + ==> "Package - Build All" + ==> "Package - Merge json.net" + ==> "Package - Create nuget" + ==> "Package" + + "Prepare" + ==> "Version" + ==> "Push Package - Build All" + ==> "Package - Push" + ==> "PushPackage" + + "Build.NetFramework" + ==> "NetFramework - Unit Tests" + ==> "Test.NetFramework.Unit" + + "Build.NetFramework" + ==> "NetFramework - Integration Tests" + ==> "Test.NetFramework.Integration" + + "Build.NetStandard" + ==> "NetStandard - Unit Tests" + ==> "Test.NetStandard.Unit" + + "Build.NetStandard" + ==> "NetStandard - Integration Tests" + ==> "Test.NetStandard.Integration" + + "Build.NetStandard" + ==> "NetStandard - Unit Tests with retry" + ==> "Test.NetStandard.Unit.WithRetry" + +//----------------------------------------------------------------------------- +// Target Create +//----------------------------------------------------------------------------- + +let initTargets () = + printfn "Hi there" + +//----------------------------------------------------------------------------- +// Target Start +//----------------------------------------------------------------------------- + +[] +let main argv = + argv + |> Array.toList + |> Context.FakeExecutionContext.Create false "build-script.fsx" + |> Context.RuntimeContext.Fake + |> Context.setExecutionContext + initTargets1 (argv) + Target.runOrDefaultWithArguments "Build.NetFramework" + + 0 // return an integer exit code diff --git a/build-script/paket.dependencies b/build-script/paket.dependencies new file mode 100644 index 000000000..40cac5d3b --- /dev/null +++ b/build-script/paket.dependencies @@ -0,0 +1,10 @@ +source https://api.nuget.org/v3/index.json + +storage: none +framework: netstandard2.0, net462, net6.0, net7.0 +nuget Fake.Core.Target +nuget Fake.DotNet.AssemblyInfoFile +nuget Fake.DotNet.Cli +nuget Fake.DotNet.Testing.XUnit2 +nuget System.Core +nuget System.Xml.Linq \ No newline at end of file diff --git a/build-script/paket.lock b/build-script/paket.lock new file mode 100644 index 000000000..c6682dba6 --- /dev/null +++ b/build-script/paket.lock @@ -0,0 +1,205 @@ +STORAGE: NONE +RESTRICTION: || (== net462) (== net6.0) (== net7.0) (== netstandard2.0) +NUGET + remote: https://api.nuget.org/v3/index.json + BlackFox.VsWhere (1.1) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 4.2.3) - restriction: || (&& (== net462) (< net45) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Win32.Registry (>= 4.7) - restriction: || (&& (== net462) (< net45) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.CommandLineParsing (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FParsec (>= 1.1.1) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Context (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Environment (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.FakeVar (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Context (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Process (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Environment (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.FakeVar (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.String (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.IO.FileSystem (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Collections.Immutable (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.SemVer (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.String (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Target (6.0) + Fake.Core.CommandLineParsing (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Context (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Environment (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.FakeVar (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Process (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.String (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Control.Reactive (>= 5.0.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Tasks (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Environment (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.FakeVar (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Xml (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.String (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.DotNet.AssemblyInfoFile (6.0) + Fake.Core.Environment (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.String (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.IO.FileSystem (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.DotNet.Cli (6.0) + Fake.Core.Environment (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Process (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.String (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.DotNet.MSBuild (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.DotNet.NuGet (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.IO.FileSystem (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Mono.Posix.NETStandard (>= 1.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Newtonsoft.Json (>= 13.0.1) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.DotNet.MSBuild (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + BlackFox.VsWhere (>= 1.1) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Environment (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Process (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.String (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.IO.FileSystem (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + MSBuild.StructuredLogger (>= 2.1.545) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.DotNet.NuGet (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Environment (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Process (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.SemVer (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.String (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Tasks (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Xml (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.IO.FileSystem (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Net.Http (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Newtonsoft.Json (>= 13.0.1) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Protocol (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.DotNet.Testing.XUnit2 (6.0) + Fake.Core.Process (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.String (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.IO.FileSystem (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Testing.Common (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.IO.FileSystem (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.String (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Net.Http (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Testing.Common (6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Fake.Core.Trace (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 6.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FParsec (1.1.1) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 4.3.4) + FSharp.Control.Reactive (5.0.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (>= 4.7.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Reactive (>= 5.0 < 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + FSharp.Core (7.0.200) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Build.Framework (17.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Win32.Registry (>= 5.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== netstandard2.0) + System.Security.Permissions (>= 6.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Build.Utilities.Core (17.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Build.Framework (>= 17.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.NET.StringTools (>= 17.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Win32.Registry (>= 5.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== netstandard2.0) + System.Collections.Immutable (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Configuration.ConfigurationManager (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Permissions (>= 6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== netstandard2.0) + System.Text.Encoding.CodePages (>= 6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== netstandard2.0) + Microsoft.NET.StringTools (17.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net472)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net472)) (== netstandard2.0) + Microsoft.NETCore.Platforms (7.0.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (< netstandard1.2)) (&& (== net6.0) (< netstandard1.3)) (&& (== net6.0) (< netstandard1.5)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (< netstandard1.2)) (&& (== net7.0) (< netstandard1.3)) (&& (== net7.0) (< netstandard1.5)) (== netstandard2.0) + Microsoft.NETCore.Targets (5.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (< netstandard1.2)) (&& (== net6.0) (< netstandard1.3)) (&& (== net6.0) (< netstandard1.5)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (< netstandard1.2)) (&& (== net7.0) (< netstandard1.3)) (&& (== net7.0) (< netstandard1.5)) (== netstandard2.0) + Microsoft.Win32.Registry (5.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= monoandroid) (< netstandard1.3)) (&& (== net462) (>= monotouch)) (&& (== net462) (< net46) (>= netstandard2.0)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (&& (== net462) (>= xamarintvos)) (&& (== net462) (>= xamarinwatchos)) (&& (== net6.0) (>= monoandroid) (< netstandard1.3)) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== net7.0) (>= monoandroid) (< netstandard1.3)) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (>= xamarinios)) (&& (== net7.0) (>= xamarinmac)) (&& (== net7.0) (>= xamarintvos)) (&& (== net7.0) (>= xamarinwatchos)) (== netstandard2.0) + System.Memory (>= 4.5.4) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net46) (>= netstandard2.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= uap10.1)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) + System.Security.AccessControl (>= 5.0) + System.Security.Principal.Windows (>= 5.0) + Microsoft.Win32.SystemEvents (7.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= net7.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + Mono.Posix.NETStandard (1.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + MSBuild.StructuredLogger (2.1.790) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Build.Framework (>= 16.10) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Build.Utilities.Core (>= 16.10) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Newtonsoft.Json (13.0.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Common (6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Frameworks (>= 6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Configuration (6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Common (>= 6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Frameworks (6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Packaging (6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Newtonsoft.Json (>= 13.0.1) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Configuration (>= 6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Versioning (>= 6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (== net462) (>= net5.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (== net462) (>= net5.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Protocol (6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Packaging (>= 6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + NuGet.Versioning (6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Buffers (4.5.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (== net462) (>= monotouch) (>= netstandard2.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net462) (>= netstandard2.0) (>= xamarintvos)) (&& (== net462) (>= netstandard2.0) (>= xamarinwatchos)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (&& (== net6.0) (>= monoandroid) (< netstandard1.3)) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== net7.0) (>= monoandroid) (< netstandard1.3)) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (>= xamarinios)) (&& (== net7.0) (>= xamarinmac)) (&& (== net7.0) (>= xamarintvos)) (&& (== net7.0) (>= xamarinwatchos)) (== netstandard2.0) + System.Collections.Immutable (7.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (== net462) (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Configuration.ConfigurationManager (7.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Diagnostics.EventLog (>= 7.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net6.0) (>= net7.0)) (== net7.0) (&& (== netstandard2.0) (>= net7.0)) + System.Security.Cryptography.ProtectedData (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Permissions (>= 7.0) + System.Core (3.5.21022.801) + System.Diagnostics.EventLog (7.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net6.0) (>= net7.0)) (== net7.0) (&& (== netstandard2.0) (>= net7.0)) + System.Drawing.Common (7.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= net7.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + Microsoft.Win32.SystemEvents (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + System.Formats.Asn1 (7.0) - restriction: || (&& (== net462) (>= net5.0)) (&& (== net462) (>= netcoreapp3.0)) (&& (== net462) (>= netstandard2.1)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Memory (4.5.5) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (== net462) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (< netstandard1.1)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (< netstandard1.1)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= xamarinios)) (&& (== net7.0) (>= xamarinmac)) (&& (== net7.0) (>= xamarintvos)) (&& (== net7.0) (>= xamarinwatchos)) (== netstandard2.0) + System.Numerics.Vectors (>= 4.4) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net7.0) (< netcoreapp2.0)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net462) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (< netstandard1.1)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= uap10.1)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (< netstandard1.1)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= uap10.1)) (&& (== net7.0) (>= xamarinios)) (&& (== net7.0) (>= xamarinmac)) (&& (== net7.0) (>= xamarintvos)) (&& (== net7.0) (>= xamarinwatchos)) (== netstandard2.0) + System.Numerics.Vectors (4.5) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< netcoreapp2.0)) (== netstandard2.0) + System.Reactive (5.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net7.0) (< netcoreapp3.1)) (== netstandard2.0) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= uap10.1)) (&& (== net6.0) (>= net472)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) + System.Runtime (4.3.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net7.0) (< netcoreapp3.1)) (== netstandard2.0) + Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (== net462) (< net45)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (== net462) (< net45)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (== net6.0) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (< netstandard1.1)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) + System.Runtime.InteropServices.WindowsRuntime (4.3) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net7.0) (< netcoreapp3.1)) (== netstandard2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net462) (< net45)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.AccessControl (6.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= netcoreapp2.1)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Principal.Windows (>= 5.0) - restriction: || (== net462) (&& (== net6.0) (>= net461)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (== net462) (>= net5.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= netstandard2.1)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Formats.Asn1 (>= 5.0) - restriction: || (&& (== net462) (>= netcoreapp3.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= netcoreapp3.0)) + System.Security.Cryptography.Pkcs (7.0.1) - restriction: || (&& (== net462) (>= net5.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) + System.Formats.Asn1 (>= 7.0) - restriction: || (&& (== net462) (>= netstandard2.1)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.1)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< net6.0)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) + System.Security.Cryptography.ProtectedData (7.0.1) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net462) (== net7.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Security.Permissions (7.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.AccessControl (>= 6.0) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Windows.Extensions (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + System.Security.Principal.Windows (5.0) - restriction: || (&& (== net462) (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (== net462) (>= monotouch) (>= netstandard2.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= netcoreapp2.1)) (&& (== net462) (>= netstandard2.0) (>= uap10.1)) (&& (== net462) (>= netstandard2.0) (>= xamarintvos)) (&& (== net462) (>= netstandard2.0) (>= xamarinwatchos)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Text.Encoding.CodePages (7.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (== net462) (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (>= net472)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net462) (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (< netstandard1.0)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= wp8)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (< netstandard1.0)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= wp8)) (== netstandard2.0) + System.Windows.Extensions (7.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= net7.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + System.Drawing.Common (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + System.Xml.Linq (3.5.21022.801) diff --git a/build-script/paket.references b/build-script/paket.references new file mode 100644 index 000000000..3a4fc4487 --- /dev/null +++ b/build-script/paket.references @@ -0,0 +1,6 @@ +Fake.Core.Target +Fake.DotNet.AssemblyInfoFile +Fake.DotNet.Cli +Fake.DotNet.Testing.XUnit2 +System.Core +System.Xml.Linq \ No newline at end of file diff --git a/build.cmd b/build.cmd index 4ef039cb0..63f20c506 100644 --- a/build.cmd +++ b/build.cmd @@ -1,4 +1,4 @@ @echo off cls dotnet tool restore -if "%~1"=="" (dotnet fake run build.fsx) else (dotnet fake run build.fsx -t %*) +if "%~1"=="" (dotnet run --project ./build-script/build-script.fsproj) else (dotnet run --project ./build-script/build-script.fsproj -- -t %*) diff --git a/build.sh b/build.sh index 8dfa78f56..6abf20884 100755 --- a/build.sh +++ b/build.sh @@ -3,7 +3,7 @@ dotnet tool restore if [ $# -eq 0 ] then - dotnet fake run build.fsx + dotnet run --project ./build-script/build-script.fsproj else - dotnet fake run build.fsx -t $@ + dotnet run --project ./build-script/build-script.fsproj -- -t $@ fi From 245f3ce22afbc46553a28258c2654a05b681c8a8 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Mon, 20 Mar 2023 21:11:45 +0530 Subject: [PATCH 19/72] Fixed build error for fake project using right dependency imports --- build-script/build-script.fsproj | 2 +- build-script/build.fs | 4 +- build-script/paket.dependencies | 5 +- build-script/paket.lock | 119 ++++++++++++++++++++----------- build-script/paket.references | 10 ++- 5 files changed, 92 insertions(+), 48 deletions(-) diff --git a/build-script/build-script.fsproj b/build-script/build-script.fsproj index 500bbadd7..1eb82ea29 100644 --- a/build-script/build-script.fsproj +++ b/build-script/build-script.fsproj @@ -12,4 +12,4 @@ - + \ No newline at end of file diff --git a/build-script/build.fs b/build-script/build.fs index e39c69482..b9cbf6252 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -13,9 +13,11 @@ open System.Xml.XPath open FSharp.Core open Fake.Testing.Common open Fake.DotNet.NuGet +open System.IO open System.Text.RegularExpressions -let currentDir = __SOURCE_DIRECTORY__ +let currentDir = DirectoryInfo(__SOURCE_DIRECTORY__).Parent.FullName; + let netstandardTestDir = "src/IO.Ably.Tests.DotNET" let xUnit2 = XUnit2.run diff --git a/build-script/paket.dependencies b/build-script/paket.dependencies index 40cac5d3b..926f45025 100644 --- a/build-script/paket.dependencies +++ b/build-script/paket.dependencies @@ -6,5 +6,8 @@ nuget Fake.Core.Target nuget Fake.DotNet.AssemblyInfoFile nuget Fake.DotNet.Cli nuget Fake.DotNet.Testing.XUnit2 +nuget Microsoft.Build 17.3.2 +nuget Microsoft.Build.Framework 17.3.2 +nuget Microsoft.Build.Tasks.Core 17.3.2 nuget System.Core -nuget System.Xml.Linq \ No newline at end of file +nuget System.Xml.Linq diff --git a/build-script/paket.lock b/build-script/paket.lock index c6682dba6..b89fc23b3 100644 --- a/build-script/paket.lock +++ b/build-script/paket.lock @@ -109,28 +109,51 @@ NUGET FSharp.Core (>= 4.7.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Reactive (>= 5.0 < 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) FSharp.Core (7.0.200) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - Microsoft.Build.Framework (17.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - Microsoft.Win32.Registry (>= 5.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== netstandard2.0) - System.Security.Permissions (>= 6.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - Microsoft.Build.Utilities.Core (17.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - Microsoft.Build.Framework (>= 17.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - Microsoft.NET.StringTools (>= 17.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - Microsoft.Win32.Registry (>= 5.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== netstandard2.0) + Microsoft.Build (17.3.2) + Microsoft.Build.Framework (>= 17.3.2) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + Microsoft.NET.StringTools (>= 17.3.2) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + System.Collections.Immutable (>= 6.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + System.Configuration.ConfigurationManager (>= 6.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + System.Reflection.Metadata (>= 6.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + System.Reflection.MetadataLoadContext (>= 6.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + System.Text.Encoding.CodePages (>= 6.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + System.Text.Json (>= 6.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + System.Threading.Tasks.Dataflow (>= 6.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + Microsoft.Build.Framework (17.3.2) + System.Security.Permissions (>= 6.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Build.Tasks.Core (17.3.2) + Microsoft.Build.Framework (>= 17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Build.Utilities.Core (>= 17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.NET.StringTools (>= 17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Win32.Registry (>= 5.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.CodeDom (>= 6.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Collections.Immutable (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Reflection.Metadata (>= 6.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Resources.Extensions (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Cryptography.Pkcs (>= 6.0.1) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Cryptography.Xml (>= 6.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Permissions (>= 6.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Threading.Tasks.Dataflow (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Build.Utilities.Core (17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Build.Framework (>= 17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.NET.StringTools (>= 17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + Microsoft.Win32.Registry (>= 5.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) System.Collections.Immutable (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Configuration.ConfigurationManager (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Security.Permissions (>= 6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== netstandard2.0) - System.Text.Encoding.CodePages (>= 6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== netstandard2.0) - Microsoft.NET.StringTools (17.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net472)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net472)) (== netstandard2.0) + System.Security.Permissions (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Text.Encoding.CodePages (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + Microsoft.NET.StringTools (17.5) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net472)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net472)) (== netstandard2.0) Microsoft.NETCore.Platforms (7.0.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (< netstandard1.2)) (&& (== net6.0) (< netstandard1.3)) (&& (== net6.0) (< netstandard1.5)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (< netstandard1.2)) (&& (== net7.0) (< netstandard1.3)) (&& (== net7.0) (< netstandard1.5)) (== netstandard2.0) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (< netstandard1.2)) (&& (== net6.0) (< netstandard1.3)) (&& (== net6.0) (< netstandard1.5)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (< netstandard1.2)) (&& (== net7.0) (< netstandard1.3)) (&& (== net7.0) (< netstandard1.5)) (== netstandard2.0) Microsoft.Win32.Registry (5.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= monoandroid) (< netstandard1.3)) (&& (== net462) (>= monotouch)) (&& (== net462) (< net46) (>= netstandard2.0)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (&& (== net462) (>= xamarintvos)) (&& (== net462) (>= xamarinwatchos)) (&& (== net6.0) (>= monoandroid) (< netstandard1.3)) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== net7.0) (>= monoandroid) (< netstandard1.3)) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (>= xamarinios)) (&& (== net7.0) (>= xamarinmac)) (&& (== net7.0) (>= xamarintvos)) (&& (== net7.0) (>= xamarinwatchos)) (== netstandard2.0) - System.Memory (>= 4.5.4) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net46) (>= netstandard2.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= uap10.1)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (&& (== net462) (>= monoandroid) (< netstandard1.3)) (&& (== net462) (>= monotouch)) (&& (== net462) (< net46) (>= netstandard2.0)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (&& (== net462) (>= xamarintvos)) (&& (== net462) (>= xamarinwatchos)) (&& (== net6.0) (>= monoandroid) (< netstandard1.3)) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== net7.0) (>= monoandroid) (< netstandard1.3)) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (>= xamarinios)) (&& (== net7.0) (>= xamarinmac)) (&& (== net7.0) (>= xamarintvos)) (&& (== net7.0) (>= xamarinwatchos)) (== netstandard2.0) + System.Memory (>= 4.5.4) - restriction: || (&& (== net462) (< net46) (>= netstandard2.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= uap10.1)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) System.Security.AccessControl (>= 5.0) System.Security.Principal.Windows (>= 5.0) - Microsoft.Win32.SystemEvents (7.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= net7.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + Microsoft.Win32.SystemEvents (7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) Mono.Posix.NETStandard (1.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) MSBuild.StructuredLogger (2.1.790) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) Microsoft.Build.Framework (>= 16.10) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) @@ -151,55 +174,65 @@ NUGET NuGet.Protocol (6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) NuGet.Packaging (>= 6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) NuGet.Versioning (6.5) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Buffers (4.5.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (== net462) (>= monotouch) (>= netstandard2.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net462) (>= netstandard2.0) (>= xamarintvos)) (&& (== net462) (>= netstandard2.0) (>= xamarinwatchos)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (&& (== net6.0) (>= monoandroid) (< netstandard1.3)) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== net7.0) (>= monoandroid) (< netstandard1.3)) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (>= xamarinios)) (&& (== net7.0) (>= xamarinmac)) (&& (== net7.0) (>= xamarintvos)) (&& (== net7.0) (>= xamarinwatchos)) (== netstandard2.0) - System.Collections.Immutable (7.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Buffers (4.5.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= net6.0)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) + System.CodeDom (7.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Collections.Immutable (7.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (== net462) (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) - System.Configuration.ConfigurationManager (7.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Configuration.ConfigurationManager (7.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Diagnostics.EventLog (>= 7.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net6.0) (>= net7.0)) (== net7.0) (&& (== netstandard2.0) (>= net7.0)) System.Security.Cryptography.ProtectedData (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Security.Permissions (>= 7.0) System.Core (3.5.21022.801) System.Diagnostics.EventLog (7.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net6.0) (>= net7.0)) (== net7.0) (&& (== netstandard2.0) (>= net7.0)) - System.Drawing.Common (7.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= net7.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + System.Drawing.Common (7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) Microsoft.Win32.SystemEvents (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) - System.Formats.Asn1 (7.0) - restriction: || (&& (== net462) (>= net5.0)) (&& (== net462) (>= netcoreapp3.0)) (&& (== net462) (>= netstandard2.1)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Formats.Asn1 (7.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.1)) (== net6.0) (== net7.0) (== netstandard2.0) System.Buffers (>= 4.5.1) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) - System.Memory (4.5.5) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (== net462) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (< netstandard1.1)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (< netstandard1.1)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= xamarinios)) (&& (== net7.0) (>= xamarinmac)) (&& (== net7.0) (>= xamarintvos)) (&& (== net7.0) (>= xamarinwatchos)) (== netstandard2.0) - System.Numerics.Vectors (>= 4.4) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net7.0) (< netcoreapp2.0)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net462) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (< netstandard1.1)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= uap10.1)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (< netstandard1.1)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= uap10.1)) (&& (== net7.0) (>= xamarinios)) (&& (== net7.0) (>= xamarinmac)) (&& (== net7.0) (>= xamarintvos)) (&& (== net7.0) (>= xamarinwatchos)) (== netstandard2.0) - System.Numerics.Vectors (4.5) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< netcoreapp2.0)) (== netstandard2.0) + System.Memory (4.5.5) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) System.Reactive (5.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net7.0) (< netcoreapp3.1)) (== netstandard2.0) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= uap10.1)) (&& (== net6.0) (>= net472)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) + System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net7.0) (< netcoreapp3.1)) (== netstandard2.0) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= uap10.1)) (&& (== net6.0) (>= net472)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) + System.Reflection.Metadata (7.0.1) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Collections.Immutable (>= 7.0) + System.Reflection.MetadataLoadContext (7.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + System.Collections.Immutable (>= 7.0) + System.Reflection.Metadata (>= 7.0) + System.Resources.Extensions (7.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) System.Runtime (4.3.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net7.0) (< netcoreapp3.1)) (== netstandard2.0) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (== net462) (< net45)) (== net6.0) (== net7.0) (== netstandard2.0) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (== net462) (< net45)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (== net6.0) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (< netstandard1.1)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net461)) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (< netstandard1.0)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= uap10.1)) (&& (== net7.0) (>= wp8)) (== netstandard2.0) System.Runtime.InteropServices.WindowsRuntime (4.3) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net7.0) (< netcoreapp3.1)) (== netstandard2.0) System.Runtime (>= 4.3) - restriction: || (&& (== net462) (< net45)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Security.AccessControl (6.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= netcoreapp2.1)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.AccessControl (6.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) System.Security.Principal.Windows (>= 5.0) - restriction: || (== net462) (&& (== net6.0) (>= net461)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) - System.Security.Cryptography.Cng (5.0) - restriction: || (&& (== net462) (>= net5.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= netstandard2.1)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Formats.Asn1 (>= 5.0) - restriction: || (&& (== net462) (>= netcoreapp3.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= netcoreapp3.0)) - System.Security.Cryptography.Pkcs (7.0.1) - restriction: || (&& (== net462) (>= net5.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (== net462) (>= net5.0)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= netstandard2.1)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Cryptography.Pkcs (7.0.1) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) System.Formats.Asn1 (>= 7.0) - restriction: || (&& (== net462) (>= netstandard2.1)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.1)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< net6.0)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) - System.Security.Cryptography.ProtectedData (7.0.1) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (&& (== net462) (== net7.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) - System.Security.Permissions (7.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (== net462) (>= netstandard2.1)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< net6.0)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) + System.Security.Cryptography.ProtectedData (7.0.1) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Cryptography.Xml (7.0.1) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Security.AccessControl (>= 6.0) - restriction: || (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Security.Cryptography.Pkcs (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Security.Permissions (7.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Security.AccessControl (>= 6.0) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) System.Windows.Extensions (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) - System.Security.Principal.Windows (5.0) - restriction: || (&& (== net462) (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (== net462) (>= monotouch) (>= netstandard2.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= netcoreapp2.1)) (&& (== net462) (>= netstandard2.0) (>= uap10.1)) (&& (== net462) (>= netstandard2.0) (>= xamarintvos)) (&& (== net462) (>= netstandard2.0) (>= xamarinwatchos)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Text.Encoding.CodePages (7.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Security.Principal.Windows (5.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= netcoreapp2.1)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Text.Encoding.CodePages (7.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (== net462) (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Text.Encodings.Web (7.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (== net462) (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Text.Json (7.0.2) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (== net462) (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Text.Encodings.Web (>= 7.0) + System.Threading.Tasks.Dataflow (7.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (>= net472)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net462) (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (< netstandard1.0)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= wp8)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (< netstandard1.0)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= wp8)) (== netstandard2.0) - System.Windows.Extensions (7.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= net7.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) + System.Windows.Extensions (7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) System.Drawing.Common (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) System.Xml.Linq (3.5.21022.801) diff --git a/build-script/paket.references b/build-script/paket.references index 3a4fc4487..e04306819 100644 --- a/build-script/paket.references +++ b/build-script/paket.references @@ -1,6 +1,12 @@ +Microsoft.Build +Microsoft.Build.Framework +Microsoft.Build.Tasks.Core +Microsoft.Build.Utilities.Core Fake.Core.Target +Fake.Core.CommandLineParsing Fake.DotNet.AssemblyInfoFile +Fake.IO.FileSystem Fake.DotNet.Cli +Fake.DotNet.MSBuild Fake.DotNet.Testing.XUnit2 -System.Core -System.Xml.Linq \ No newline at end of file +Fake.DotNet.NuGet \ No newline at end of file From 449ead3a371a74148ccda01925205c82f7b2e822 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Tue, 21 Mar 2023 01:03:44 +0530 Subject: [PATCH 20/72] Fixed build, refactored packet dependencies --- build-script/build.fs | 6 ++++++ build-script/paket.dependencies | 3 --- build-script/paket.lock | 36 ++++++++++++++++----------------- build-script/paket.references | 8 +------- 4 files changed, 24 insertions(+), 29 deletions(-) diff --git a/build-script/build.fs b/build-script/build.fs index b9cbf6252..2628e1699 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -134,6 +134,7 @@ let initTargets1 (argv) = [ "Configuration", buildMode "RestorePackages", "True" + "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 ] } MSBuild.build setParams NetFrameworkSolution @@ -151,6 +152,7 @@ let initTargets1 (argv) = "Optimize", "True" "DebugSymbols", "True" "Configuration", buildMode + "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 ] } MSBuild.build setParams NetFrameworkSolution @@ -166,6 +168,7 @@ let initTargets1 (argv) = "Optimize", "True" "DebugSymbols", "True" "Configuration", buildMode + "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 ] } MSBuild.build setParams XamarinSolution @@ -303,6 +306,7 @@ let initTargets1 (argv) = "Optimize", "True" "DebugSymbols", "True" "Configuration", buildMode + "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 ] } MSBuild.build setParams NetFrameworkSolution @@ -385,6 +389,7 @@ let initTargets1 (argv) = "StyleCopEnabled", "True" "Package", "True" "DefineConstants", "PACKAGE" + "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 ] } MSBuild.build setParams packageSolution @@ -403,6 +408,7 @@ let initTargets1 (argv) = "StyleCopEnabled", "True" "Package", "True" "DefineConstants", "PACKAGE" + "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 ] } MSBuild.build setParams pushPackageSolution diff --git a/build-script/paket.dependencies b/build-script/paket.dependencies index 926f45025..d5e4f68cd 100644 --- a/build-script/paket.dependencies +++ b/build-script/paket.dependencies @@ -7,7 +7,4 @@ nuget Fake.DotNet.AssemblyInfoFile nuget Fake.DotNet.Cli nuget Fake.DotNet.Testing.XUnit2 nuget Microsoft.Build 17.3.2 -nuget Microsoft.Build.Framework 17.3.2 nuget Microsoft.Build.Tasks.Core 17.3.2 -nuget System.Core -nuget System.Xml.Linq diff --git a/build-script/paket.lock b/build-script/paket.lock index b89fc23b3..6d00ab95d 100644 --- a/build-script/paket.lock +++ b/build-script/paket.lock @@ -120,13 +120,13 @@ NUGET System.Text.Encoding.CodePages (>= 6.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) System.Text.Json (>= 6.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) System.Threading.Tasks.Dataflow (>= 6.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - Microsoft.Build.Framework (17.3.2) + Microsoft.Build.Framework (17.3.2) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Security.Permissions (>= 6.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) Microsoft.Build.Tasks.Core (17.3.2) Microsoft.Build.Framework (>= 17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) Microsoft.Build.Utilities.Core (>= 17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) Microsoft.NET.StringTools (>= 17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - Microsoft.Win32.Registry (>= 5.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + Microsoft.Win32.Registry (>= 5.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) System.CodeDom (>= 6.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Collections.Immutable (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Reflection.Metadata (>= 6.0) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) @@ -138,19 +138,19 @@ NUGET Microsoft.Build.Utilities.Core (17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) Microsoft.Build.Framework (>= 17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) Microsoft.NET.StringTools (>= 17.3.2) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - Microsoft.Win32.Registry (>= 5.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + Microsoft.Win32.Registry (>= 5.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) System.Collections.Immutable (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Configuration.ConfigurationManager (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Security.Permissions (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) - System.Text.Encoding.CodePages (>= 6.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Security.Permissions (>= 6.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Text.Encoding.CodePages (>= 6.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) Microsoft.NET.StringTools (17.5) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net472)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net472)) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net472)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net472)) (== netstandard2.0) Microsoft.NETCore.Platforms (7.0.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (< netstandard1.2)) (&& (== net6.0) (< netstandard1.3)) (&& (== net6.0) (< netstandard1.5)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (< netstandard1.2)) (&& (== net7.0) (< netstandard1.3)) (&& (== net7.0) (< netstandard1.5)) (== netstandard2.0) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net45) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (< netstandard1.2)) (&& (== net6.0) (< netstandard1.3)) (&& (== net6.0) (< netstandard1.5)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (< netstandard1.2)) (&& (== net7.0) (< netstandard1.3)) (&& (== net7.0) (< netstandard1.5)) (== netstandard2.0) Microsoft.Win32.Registry (5.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (&& (== net462) (>= monoandroid) (< netstandard1.3)) (&& (== net462) (>= monotouch)) (&& (== net462) (< net46) (>= netstandard2.0)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (&& (== net462) (>= xamarintvos)) (&& (== net462) (>= xamarinwatchos)) (&& (== net6.0) (>= monoandroid) (< netstandard1.3)) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== net7.0) (>= monoandroid) (< netstandard1.3)) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (>= xamarinios)) (&& (== net7.0) (>= xamarinmac)) (&& (== net7.0) (>= xamarintvos)) (&& (== net7.0) (>= xamarinwatchos)) (== netstandard2.0) - System.Memory (>= 4.5.4) - restriction: || (&& (== net462) (< net46) (>= netstandard2.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= uap10.1)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= monoandroid) (< netstandard1.3)) (&& (== net462) (>= monotouch)) (&& (== net462) (< net46) (>= netstandard2.0)) (&& (== net462) (>= xamarinios)) (&& (== net462) (>= xamarinmac)) (&& (== net462) (>= xamarintvos)) (&& (== net462) (>= xamarinwatchos)) (&& (== net6.0) (>= monoandroid) (< netstandard1.3)) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== net7.0) (>= monoandroid) (< netstandard1.3)) (&& (== net7.0) (>= monotouch)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (>= xamarinios)) (&& (== net7.0) (>= xamarinmac)) (&& (== net7.0) (>= xamarintvos)) (&& (== net7.0) (>= xamarinwatchos)) (== netstandard2.0) + System.Memory (>= 4.5.4) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (< net46) (>= netstandard2.0)) (&& (== net462) (>= netcoreapp2.0)) (&& (== net462) (>= uap10.1)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (< netcoreapp2.0)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) System.Security.AccessControl (>= 5.0) System.Security.Principal.Windows (>= 5.0) Microsoft.Win32.SystemEvents (7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) @@ -182,7 +182,6 @@ NUGET System.Diagnostics.EventLog (>= 7.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net6.0) (>= net7.0)) (== net7.0) (&& (== netstandard2.0) (>= net7.0)) System.Security.Cryptography.ProtectedData (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Security.Permissions (>= 7.0) - System.Core (3.5.21022.801) System.Diagnostics.EventLog (7.0) - restriction: || (&& (== net462) (>= net7.0)) (&& (== net6.0) (>= net7.0)) (== net7.0) (&& (== netstandard2.0) (>= net7.0)) System.Drawing.Common (7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) Microsoft.Win32.SystemEvents (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) @@ -191,8 +190,8 @@ NUGET System.Memory (>= 4.5.5) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) System.Memory (4.5.5) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) System.Reactive (5.0) - restriction: || (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: || (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net7.0) (< netcoreapp3.1)) (== netstandard2.0) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= uap10.1)) (&& (== net6.0) (>= net472)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) + System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net7.0) (< netcoreapp3.1)) (== netstandard2.0) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= uap10.1)) (&& (== net6.0) (>= net472)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< netcoreapp3.1)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) System.Reflection.Metadata (7.0.1) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Collections.Immutable (>= 7.0) System.Reflection.MetadataLoadContext (7.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) @@ -206,18 +205,18 @@ NUGET System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (&& (== net7.0) (>= net461)) (&& (== net7.0) (>= net472)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (< netstandard1.0)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= uap10.1)) (&& (== net7.0) (>= wp8)) (== netstandard2.0) System.Runtime.InteropServices.WindowsRuntime (4.3) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net7.0) (< netcoreapp3.1)) (== netstandard2.0) System.Runtime (>= 4.3) - restriction: || (&& (== net462) (< net45)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Security.AccessControl (6.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Security.AccessControl (6.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= net6.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) System.Security.Principal.Windows (>= 5.0) - restriction: || (== net462) (&& (== net6.0) (>= net461)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) System.Security.Cryptography.Cng (5.0) - restriction: || (&& (== net462) (>= net5.0)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (&& (== net462) (>= netstandard2.1)) (== net6.0) (== net7.0) (== netstandard2.0) System.Security.Cryptography.Pkcs (7.0.1) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) System.Formats.Asn1 (>= 7.0) - restriction: || (&& (== net462) (>= netstandard2.1)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (== net462) (>= netstandard2.1)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< net6.0)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (== net462) (== net6.0)) (&& (== net462) (== net7.0)) (&& (== net462) (>= netstandard2.1)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< net6.0)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0) System.Security.Cryptography.ProtectedData (7.0.1) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Security.Cryptography.Xml (7.0.1) - restriction: || (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (&& (== net7.0) (< net6.0)) (== netstandard2.0) - System.Security.AccessControl (>= 6.0) - restriction: || (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net462) (== net7.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) + System.Security.AccessControl (>= 6.0) - restriction: || (&& (== net462) (== net7.0)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) System.Security.Cryptography.Pkcs (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Security.Permissions (7.0) - restriction: || (&& (== net462) (>= net472)) (&& (== net462) (>= net6.0)) (&& (== net462) (>= netstandard2.0)) (== net6.0) (== net7.0) (== netstandard2.0) System.Security.AccessControl (>= 6.0) - restriction: || (== net462) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) @@ -235,4 +234,3 @@ NUGET System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net462) (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (< netstandard1.0)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= wp8)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< netcoreapp2.1)) (&& (== net7.0) (< netstandard1.0)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= wp8)) (== netstandard2.0) System.Windows.Extensions (7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) System.Drawing.Common (>= 7.0) - restriction: || (&& (== net462) (>= net6.0)) (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= net6.0)) - System.Xml.Linq (3.5.21022.801) diff --git a/build-script/paket.references b/build-script/paket.references index e04306819..539702f5e 100644 --- a/build-script/paket.references +++ b/build-script/paket.references @@ -1,12 +1,6 @@ Microsoft.Build -Microsoft.Build.Framework Microsoft.Build.Tasks.Core -Microsoft.Build.Utilities.Core Fake.Core.Target -Fake.Core.CommandLineParsing Fake.DotNet.AssemblyInfoFile -Fake.IO.FileSystem Fake.DotNet.Cli -Fake.DotNet.MSBuild -Fake.DotNet.Testing.XUnit2 -Fake.DotNet.NuGet \ No newline at end of file +Fake.DotNet.Testing.XUnit2 \ No newline at end of file From a255f6c837f27915c0ef026acb2e6d5f5325a4df Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Tue, 21 Mar 2023 01:13:50 +0530 Subject: [PATCH 21/72] Refactored build.fs file --- build-script/build.fs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/build-script/build.fs b/build-script/build.fs index 2628e1699..93255f104 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -1,5 +1,4 @@ open Fake.Core.TargetOperators -open Fake.Core.Operators open Fake.Core open Fake.IO.Globbing.Operators open Fake.DotNet @@ -12,7 +11,6 @@ open System.Xml.Linq open System.Xml.XPath open FSharp.Core open Fake.Testing.Common -open Fake.DotNet.NuGet open System.IO open System.Text.RegularExpressions @@ -45,7 +43,7 @@ Options: -v Version """ -let initTargets1 (argv) = +let initTargets (argv) = // retrieve the fake 5 context information @@ -531,13 +529,6 @@ let initTargets1 (argv) = "Build.NetStandard" ==> "NetStandard - Unit Tests with retry" ==> "Test.NetStandard.Unit.WithRetry" - -//----------------------------------------------------------------------------- -// Target Create -//----------------------------------------------------------------------------- - -let initTargets () = - printfn "Hi there" //----------------------------------------------------------------------------- // Target Start @@ -550,7 +541,7 @@ let main argv = |> Context.FakeExecutionContext.Create false "build-script.fsx" |> Context.RuntimeContext.Fake |> Context.setExecutionContext - initTargets1 (argv) + initTargets (argv) Target.runOrDefaultWithArguments "Build.NetFramework" 0 // return an integer exit code From 296689ec926b076fcda654e90f33be0eeab9cf3a Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Mon, 10 Apr 2023 16:45:09 +0530 Subject: [PATCH 22/72] Included F# specific tools for formatting and building docs in dotnet tools --- .config/dotnet-tools.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index c3c6e6c57..1a7da45f6 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -7,6 +7,24 @@ "commands": [ "paket" ] + }, + "fake-cli": { + "version": "5.23.1", + "commands": [ + "fake" + ] + }, + "fsdocs-tool": { + "version": "17.2.0", + "commands": [ + "fsdocs" + ] + }, + "fantomas": { + "version": "5.1.5", + "commands": [ + "fantomas" + ] } } } From 0e68cefbaa4ddeb6a063eb1caf6b3e90a3375eb9 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Tue, 11 Apr 2023 21:36:50 +0530 Subject: [PATCH 23/72] Added propertygroup to select netstandard as targetframework for mono --- src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj b/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj index 5fff24ed8..47c26c065 100644 --- a/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj +++ b/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj @@ -8,6 +8,10 @@ IO.Ably IO.Ably + + + netstandard2.0 + true From 92691ab5477c3d13e5366bf4d6fa1b1f047b5de1 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Tue, 11 Apr 2023 21:47:53 +0530 Subject: [PATCH 24/72] Upgraded notificationPublisher SDK support to net6.0 --- examples/NotificationsPublisher/NotificationsPublisher.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/NotificationsPublisher/NotificationsPublisher.csproj b/examples/NotificationsPublisher/NotificationsPublisher.csproj index 752296cf2..b35e6fab5 100644 --- a/examples/NotificationsPublisher/NotificationsPublisher.csproj +++ b/examples/NotificationsPublisher/NotificationsPublisher.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 ..\..\src\IO.Ably.ruleset From 4c032a68048282790bf9212bcf2131503c247153 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Tue, 11 Apr 2023 21:48:21 +0530 Subject: [PATCH 25/72] Updated DOTNET tests core target to netcore for mono runtime build --- src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj b/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj index e48056a84..cac5ccea0 100644 --- a/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj +++ b/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj @@ -6,6 +6,10 @@ 8 + + netcoreapp3.1 + + 1701;1702;SA0001;NU1701 From c451ba045a071ac2fb1ee86d3af728262811cf26 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Tue, 11 Apr 2023 22:03:25 +0530 Subject: [PATCH 26/72] Fixed issues for mono runtime for xamarin --- examples/NotificationsPublisher/NotificationsPublisher.csproj | 2 +- src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/NotificationsPublisher/NotificationsPublisher.csproj b/examples/NotificationsPublisher/NotificationsPublisher.csproj index b35e6fab5..09dda8e64 100644 --- a/examples/NotificationsPublisher/NotificationsPublisher.csproj +++ b/examples/NotificationsPublisher/NotificationsPublisher.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + netcoreapp3.1 ..\..\src\IO.Ably.ruleset diff --git a/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj b/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj index cac5ccea0..85f95bcab 100644 --- a/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj +++ b/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj @@ -7,7 +7,9 @@ - netcoreapp3.1 + netcoreapp3.1 + ..\IO.Ably.Tests.ruleset + 8 From fe18466987873dd543c95b9de1770bd398cdafb1 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 13 Apr 2023 01:30:06 +0530 Subject: [PATCH 27/72] Updated notificationpublisher proj lang version to C# 9 --- examples/NotificationsPublisher/NotificationsPublisher.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/NotificationsPublisher/NotificationsPublisher.csproj b/examples/NotificationsPublisher/NotificationsPublisher.csproj index 09dda8e64..189ae6a6f 100644 --- a/examples/NotificationsPublisher/NotificationsPublisher.csproj +++ b/examples/NotificationsPublisher/NotificationsPublisher.csproj @@ -4,6 +4,7 @@ Exe netcoreapp3.1 ..\..\src\IO.Ably.ruleset + 9 From 395fec3ff0960e67b26c42efde8dbd9395591327 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 13 Apr 2023 01:49:44 +0530 Subject: [PATCH 28/72] Fixed restore xamarin path in build script --- build-script/build.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-script/build.fs b/build-script/build.fs index 93255f104..dfd56144c 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -122,7 +122,7 @@ let initTargets (argv) = Target.create "Restore Xamarin" (fun _ -> if not Environment.isWindows then - CreateProcess.fromRawCommand "ls" ["../packages"] |> Proc.run |> ignore + CreateProcess.fromRawCommand "ls" ["../src/packages"] |> Proc.run |> ignore let setParams (defaults:MSBuildParams) = { defaults with From a339db147ab6712fce806657b65b38e5932ab752 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 13 Apr 2023 14:51:40 +0530 Subject: [PATCH 29/72] Updated restore xamarin step, set to XamarinSolution --- build-script/build.fs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/build-script/build.fs b/build-script/build.fs index dfd56144c..190979052 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -120,9 +120,8 @@ let initTargets (argv) = ) Target.create "Restore Xamarin" (fun _ -> - if not Environment.isWindows then - CreateProcess.fromRawCommand "ls" ["../src/packages"] |> Proc.run |> ignore + CreateProcess.fromRawCommand "ls" ["../packages"] |> Proc.run |> ignore let setParams (defaults:MSBuildParams) = { defaults with @@ -135,9 +134,7 @@ let initTargets (argv) = "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 ] } - MSBuild.build setParams NetFrameworkSolution - - + MSBuild.build setParams XamarinSolution ) Target.create "NetFramework - Build" (fun _ -> From 6fa096a9e1087d003ffb42f2e00154cecdedbde0 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 13 Apr 2023 23:29:55 +0530 Subject: [PATCH 30/72] Added dotnet runtime identifier for dotnet6 and dotnet7 --- src/IO.Ably.Shared/Defaults.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/IO.Ably.Shared/Defaults.cs b/src/IO.Ably.Shared/Defaults.cs index b53474aef..0cfbc6da5 100644 --- a/src/IO.Ably.Shared/Defaults.cs +++ b/src/IO.Ably.Shared/Defaults.cs @@ -117,6 +117,10 @@ internal static string DotnetRuntimeIdentifier() return "dotnet-framework"; case "netstandard20": return "dotnet-standard"; + case "net6.0": + return "dotnet6"; + case "net7.0": + return "dotnet7"; case "xamarin-android": return "xamarin-android"; case "xamarin-ios": From 8b9c0d3f9570d72e21e4dbd6a0cf13da39954d82 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 14 Apr 2023 01:30:25 +0530 Subject: [PATCH 31/72] Added comments to process OS specific agent headers --- src/IO.Ably.NETStandard20/Platform.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IO.Ably.NETStandard20/Platform.cs b/src/IO.Ably.NETStandard20/Platform.cs index 3c1fd18fa..8b8b0ba31 100644 --- a/src/IO.Ably.NETStandard20/Platform.cs +++ b/src/IO.Ably.NETStandard20/Platform.cs @@ -18,6 +18,9 @@ static Platform() // Defined as per https://learn.microsoft.com/en-us/dotnet/standard/frameworks#preprocessor-symbols // TODO : Get runtime platform info ( android, iOS ) using https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device/information?view=net-maui-7.0&tabs=windows + // TODO : Get all operating system from https://stackoverflow.com/questions/38790802/determine-operating-system-in-net-core + // System.OperatingSystem.IsWindows(), System.OperatingSystem.IsIOS() + // Also, update OS detection for dotnetcore #if NET6_0 public string PlatformId => "net6.0"; #elif NET7_0 From 538c0453210829e53ecd36039ac8e48983fbdd47 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 14 Apr 2023 01:39:25 +0530 Subject: [PATCH 32/72] Added netframework solution to xamarin instead of dotnet6/dotnet7 tests --- src/IO.Ably.Xamarin.sln | 169 ++++++++++++++++++++-------------------- 1 file changed, 85 insertions(+), 84 deletions(-) diff --git a/src/IO.Ably.Xamarin.sln b/src/IO.Ably.Xamarin.sln index 978539a8c..6fd0e59be 100644 --- a/src/IO.Ably.Xamarin.sln +++ b/src/IO.Ably.Xamarin.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28729.10 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33213.308 MinimumVisualStudioVersion = 15.0.26730.10 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1EA29F05-BF68-4BA8-A58F-C7C131E3FC62}" ProjectSection(SolutionItems) = preProject @@ -14,9 +14,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solutio CommonAssemblyInfo.cs = CommonAssemblyInfo.cs ..\nuget\io.ably.nuspec = ..\nuget\io.ably.nuspec IO.Ably.ruleset = IO.Ably.ruleset + ..\PushNotifications.md = ..\PushNotifications.md ..\README.md = ..\README.md stylecop.json = stylecop.json - ..\PushNotifications.md = ..\PushNotifications.md EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Ably", "Ably", "{8A0F718E-2168-4CC7-8F7B-A65508B52B0F}" @@ -35,33 +35,25 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Shared.MsgPack", "I EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IO.Ably.Tests.Shared", "IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.shproj", "{1609F12C-8216-4E7C-ADE0-240BFE160242}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.DeltaCodec", "..\lib\delta-codec\IO.Ably.DeltaCodec\IO.Ably.DeltaCodec.csproj", "{53CA3FD4-E11A-4368-A7A5-BCAB40D08BED}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IO.Ably.DeltaCodec", "..\lib\delta-codec\IO.Ably.DeltaCodec\IO.Ably.DeltaCodec.csproj", "{53CA3FD4-E11A-4368-A7A5-BCAB40D08BED}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.NETStandard20", "IO.Ably.NETStandard20\IO.Ably.NETStandard20.csproj", "{97ED15E5-6546-4437-BF4F-B929700CE922}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IO.Ably.NETStandard20", "IO.Ably.NETStandard20\IO.Ably.NETStandard20.csproj", "{97ED15E5-6546-4437-BF4F-B929700CE922}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Push.Android", "IO.Ably.Push.Android\IO.Ably.Push.Android.csproj", "{F0010AA8-63C3-47D7-95E9-A5D1D04DA325}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Push.iOS", "IO.Ably.Push.iOS\IO.Ably.Push.iOS.csproj", "{E1A8FDE2-FEFC-403E-99A0-F13847B1495E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Tests.DotNET", "IO.Ably.Tests.DotNET\IO.Ably.Tests.DotNET.csproj", "{9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotnetPush", "..\examples\DotnetPush\DotnetPush\DotnetPush.csproj", "{E04ACB26-B65F-43CB-AC30-B6523A7B93C4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotnetPush", "..\examples\DotnetPush\DotnetPush\DotnetPush.csproj", "{E04ACB26-B65F-43CB-AC30-B6523A7B93C4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotnetPush.Android", "..\examples\DotnetPush\DotnetPush.Android\DotnetPush.Android.csproj", "{7050F177-1D55-4562-937C-56D117198BFB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotificationsPublisher", "..\examples\NotificationsPublisher\NotificationsPublisher.csproj", "{D150CE86-80D9-4709-B0BC-5E1A3AA457A9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotificationsPublisher", "..\examples\NotificationsPublisher\NotificationsPublisher.csproj", "{D150CE86-80D9-4709-B0BC-5E1A3AA457A9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotnetPush.iOS", "..\examples\DotnetPush\DotnetPush.iOS\DotnetPush.iOS.csproj", "{75256FFE-5F9A-4F4F-BD78-37F6489488FD}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Tests.NETFramework", "IO.Ably.Tests.NETFramework\IO.Ably.Tests.NETFramework.csproj", "{567FEEF7-41AF-42F2-AD34-546A278355B1}" +EndProject Global - GlobalSection(SharedMSBuildProjectFiles) = preSolution - IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.projitems*{1609f12c-8216-4e7c-ade0-240bfe160242}*SharedItemsImports = 13 - IO.Ably.Shared\IO.Ably.Shared.projitems*{24b6fc97-9d3d-46ae-b5cb-47458354bee1}*SharedItemsImports = 4 - IO.Ably.Shared\IO.Ably.Shared.projitems*{3553e1b2-8f1f-4e83-9524-08e702c14fcf}*SharedItemsImports = 13 - IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.projitems*{567feef7-41af-42f2-ad34-546a278355b1}*SharedItemsImports = 4 - IO.Ably.Shared\IO.Ably.Shared.projitems*{8bb7b13c-e9f4-4d1b-bccc-af890a23ece6}*SharedItemsImports = 4 - IO.Ably.Shared.MsgPack\IO.Ably.Shared.MsgPack.projitems*{eebf3249-3ca3-4078-a188-f8b916c3f4c2}*SharedItemsImports = 13 - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution AppStore|Any CPU = AppStore|Any CPU AppStore|ARM = AppStore|ARM @@ -481,70 +473,6 @@ Global {E1A8FDE2-FEFC-403E-99A0-F13847B1495E}.Release|x64.Build.0 = Release|Any CPU {E1A8FDE2-FEFC-403E-99A0-F13847B1495E}.Release|x86.ActiveCfg = Release|Any CPU {E1A8FDE2-FEFC-403E-99A0-F13847B1495E}.Release|x86.Build.0 = Release|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.AppStore|ARM.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.AppStore|x64.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.AppStore|x64.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.AppStore|x86.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.AppStore|x86.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.CI_Release|Any CPU.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.CI_Release|Any CPU.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.CI_Release|ARM.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.CI_Release|ARM.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.CI_Release|x64.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.CI_Release|x64.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.CI_Release|x86.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.CI_Release|x86.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug 4.0|Any CPU.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug 4.0|Any CPU.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug 4.0|ARM.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug 4.0|ARM.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug 4.0|x64.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug 4.0|x64.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug 4.0|x86.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug 4.0|x86.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug|ARM.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug|ARM.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug|x64.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug|x64.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug|x86.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Debug|x86.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package_netstandard|Any CPU.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package_netstandard|Any CPU.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package_netstandard|ARM.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package_netstandard|ARM.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package_netstandard|x64.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package_netstandard|x64.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package_netstandard|x86.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package_netstandard|x86.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package|Any CPU.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package|Any CPU.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package|ARM.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package|ARM.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package|x64.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package|x64.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package|x86.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.package|x86.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release 4.0|Any CPU.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release 4.0|Any CPU.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release 4.0|ARM.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release 4.0|ARM.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release 4.0|x64.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release 4.0|x64.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release 4.0|x86.ActiveCfg = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release 4.0|x86.Build.0 = Debug|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release|Any CPU.Build.0 = Release|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release|ARM.ActiveCfg = Release|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release|ARM.Build.0 = Release|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release|x64.ActiveCfg = Release|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release|x64.Build.0 = Release|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release|x86.ActiveCfg = Release|Any CPU - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C}.Release|x86.Build.0 = Release|Any CPU {E04ACB26-B65F-43CB-AC30-B6523A7B93C4}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU {E04ACB26-B65F-43CB-AC30-B6523A7B93C4}.AppStore|Any CPU.Build.0 = Debug|Any CPU {E04ACB26-B65F-43CB-AC30-B6523A7B93C4}.AppStore|ARM.ActiveCfg = Debug|Any CPU @@ -761,6 +689,8 @@ Global {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Debug 4.0|x64.Build.0 = Debug|iPhoneSimulator {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Debug 4.0|x86.ActiveCfg = Debug|iPhoneSimulator {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Debug 4.0|x86.Build.0 = Debug|iPhoneSimulator + {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Debug|Any CPU.ActiveCfg = Debug|iPhone + {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Debug|Any CPU.Build.0 = Debug|iPhone {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Debug|ARM.Build.0 = Debug|iPhoneSimulator {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator @@ -799,8 +729,70 @@ Global {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Release|x64.Build.0 = Release|iPhoneSimulator {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Release|x86.ActiveCfg = Release|iPhoneSimulator {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Release|x86.Build.0 = Release|iPhoneSimulator - {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Debug|Any CPU.ActiveCfg = Debug|iPhone - {75256FFE-5F9A-4F4F-BD78-37F6489488FD}.Debug|Any CPU.Build.0 = Debug|iPhone + {567FEEF7-41AF-42F2-AD34-546A278355B1}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.AppStore|ARM.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.AppStore|x64.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.AppStore|x64.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.AppStore|x86.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.AppStore|x86.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.CI_Release|Any CPU.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.CI_Release|Any CPU.Build.0 = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.CI_Release|ARM.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.CI_Release|ARM.Build.0 = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.CI_Release|x64.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.CI_Release|x64.Build.0 = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.CI_Release|x86.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.CI_Release|x86.Build.0 = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug 4.0|Any CPU.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug 4.0|Any CPU.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug 4.0|ARM.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug 4.0|ARM.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug 4.0|x64.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug 4.0|x64.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug 4.0|x86.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug 4.0|x86.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug|ARM.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug|ARM.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug|x64.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug|x64.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug|x86.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Debug|x86.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package_netstandard|Any CPU.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package_netstandard|Any CPU.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package_netstandard|ARM.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package_netstandard|ARM.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package_netstandard|x64.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package_netstandard|x64.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package_netstandard|x86.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package_netstandard|x86.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package|Any CPU.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package|Any CPU.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package|ARM.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package|ARM.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package|x64.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package|x64.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package|x86.ActiveCfg = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.package|x86.Build.0 = Debug|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release 4.0|Any CPU.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release 4.0|Any CPU.Build.0 = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release 4.0|ARM.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release 4.0|ARM.Build.0 = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release 4.0|x64.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release 4.0|x64.Build.0 = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release 4.0|x86.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release 4.0|x86.Build.0 = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release|Any CPU.Build.0 = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release|ARM.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release|ARM.Build.0 = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release|x64.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release|x64.Build.0 = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release|x86.ActiveCfg = Release|Any CPU + {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -815,13 +807,22 @@ Global {97ED15E5-6546-4437-BF4F-B929700CE922} = {8A0F718E-2168-4CC7-8F7B-A65508B52B0F} {F0010AA8-63C3-47D7-95E9-A5D1D04DA325} = {8A0F718E-2168-4CC7-8F7B-A65508B52B0F} {E1A8FDE2-FEFC-403E-99A0-F13847B1495E} = {8A0F718E-2168-4CC7-8F7B-A65508B52B0F} - {9922FA1F-F9E8-44FD-8B51-39E7C7D7737C} = {C2F43DB7-AAA0-4687-9897-5D686EC91245} {E04ACB26-B65F-43CB-AC30-B6523A7B93C4} = {390019FF-0139-4EB0-90FF-9BF6E68BEB42} {7050F177-1D55-4562-937C-56D117198BFB} = {390019FF-0139-4EB0-90FF-9BF6E68BEB42} {D150CE86-80D9-4709-B0BC-5E1A3AA457A9} = {390019FF-0139-4EB0-90FF-9BF6E68BEB42} {75256FFE-5F9A-4F4F-BD78-37F6489488FD} = {390019FF-0139-4EB0-90FF-9BF6E68BEB42} + {567FEEF7-41AF-42F2-AD34-546A278355B1} = {C2F43DB7-AAA0-4687-9897-5D686EC91245} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F69D4156-FC22-4B8E-AD72-2A7323D42CC4} EndGlobalSection + GlobalSection(SharedMSBuildProjectFiles) = preSolution + IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.projitems*{1609f12c-8216-4e7c-ade0-240bfe160242}*SharedItemsImports = 13 + IO.Ably.Shared\IO.Ably.Shared.projitems*{24b6fc97-9d3d-46ae-b5cb-47458354bee1}*SharedItemsImports = 4 + IO.Ably.Shared\IO.Ably.Shared.projitems*{3553e1b2-8f1f-4e83-9524-08e702c14fcf}*SharedItemsImports = 13 + IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.projitems*{567feef7-41af-42f2-ad34-546a278355b1}*SharedItemsImports = 4 + IO.Ably.Shared\IO.Ably.Shared.projitems*{8bb7b13c-e9f4-4d1b-bccc-af890a23ece6}*SharedItemsImports = 4 + IO.Ably.Shared\IO.Ably.Shared.projitems*{97ed15e5-6546-4437-bf4f-b929700ce922}*SharedItemsImports = 5 + IO.Ably.Shared.MsgPack\IO.Ably.Shared.MsgPack.projitems*{eebf3249-3ca3-4078-a188-f8b916c3f4c2}*SharedItemsImports = 13 + EndGlobalSection EndGlobal From f3856e725b34a98f8f5cd8adebcecdd0ea2deb75 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 14 Apr 2023 02:12:52 +0530 Subject: [PATCH 33/72] Added netframework project to xamarin solution --- .../IO.Ably.Tests.NETFramework.csproj | 6 +- src/IO.Ably.Xamarin.sln | 68 +++++++++++++++++++ 2 files changed, 71 insertions(+), 3 deletions(-) diff --git a/src/IO.Ably.Tests.NETFramework/IO.Ably.Tests.NETFramework.csproj b/src/IO.Ably.Tests.NETFramework/IO.Ably.Tests.NETFramework.csproj index 86d9ca85a..fa35e1740 100644 --- a/src/IO.Ably.Tests.NETFramework/IO.Ably.Tests.NETFramework.csproj +++ b/src/IO.Ably.Tests.NETFramework/IO.Ably.Tests.NETFramework.csproj @@ -142,15 +142,15 @@ all + + + {2d265650-b1ec-4f8d-b043-a2e3dcc23fd8} IO.Ably.NETFramework - - - \ No newline at end of file diff --git a/src/IO.Ably.Xamarin.sln b/src/IO.Ably.Xamarin.sln index 6fd0e59be..30c44b4d4 100644 --- a/src/IO.Ably.Xamarin.sln +++ b/src/IO.Ably.Xamarin.sln @@ -53,6 +53,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotnetPush.iOS", "..\exampl EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.Tests.NETFramework", "IO.Ably.Tests.NETFramework\IO.Ably.Tests.NETFramework.csproj", "{567FEEF7-41AF-42F2-AD34-546A278355B1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Ably.NETFramework", "IO.Ably.NETFramework\IO.Ably.NETFramework.csproj", "{2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution AppStore|Any CPU = AppStore|Any CPU @@ -793,6 +795,70 @@ Global {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release|x64.Build.0 = Release|Any CPU {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release|x86.ActiveCfg = Release|Any CPU {567FEEF7-41AF-42F2-AD34-546A278355B1}.Release|x86.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.AppStore|ARM.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.AppStore|x64.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.AppStore|x64.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.AppStore|x86.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.AppStore|x86.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.CI_Release|Any CPU.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.CI_Release|Any CPU.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.CI_Release|ARM.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.CI_Release|ARM.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.CI_Release|x64.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.CI_Release|x64.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.CI_Release|x86.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.CI_Release|x86.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug 4.0|Any CPU.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug 4.0|Any CPU.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug 4.0|ARM.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug 4.0|ARM.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug 4.0|x64.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug 4.0|x64.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug 4.0|x86.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug 4.0|x86.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug|ARM.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug|ARM.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug|x64.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug|x64.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug|x86.ActiveCfg = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Debug|x86.Build.0 = Debug|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package_netstandard|Any CPU.ActiveCfg = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package_netstandard|Any CPU.Build.0 = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package_netstandard|ARM.ActiveCfg = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package_netstandard|ARM.Build.0 = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package_netstandard|x64.ActiveCfg = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package_netstandard|x64.Build.0 = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package_netstandard|x86.ActiveCfg = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package_netstandard|x86.Build.0 = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package|Any CPU.ActiveCfg = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package|Any CPU.Build.0 = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package|ARM.ActiveCfg = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package|ARM.Build.0 = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package|x64.ActiveCfg = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package|x64.Build.0 = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package|x86.ActiveCfg = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.package|x86.Build.0 = package|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release 4.0|Any CPU.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release 4.0|Any CPU.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release 4.0|ARM.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release 4.0|ARM.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release 4.0|x64.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release 4.0|x64.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release 4.0|x86.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release 4.0|x86.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release|Any CPU.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release|ARM.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release|ARM.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release|x64.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release|x64.Build.0 = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release|x86.ActiveCfg = Release|Any CPU + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -812,6 +878,7 @@ Global {D150CE86-80D9-4709-B0BC-5E1A3AA457A9} = {390019FF-0139-4EB0-90FF-9BF6E68BEB42} {75256FFE-5F9A-4F4F-BD78-37F6489488FD} = {390019FF-0139-4EB0-90FF-9BF6E68BEB42} {567FEEF7-41AF-42F2-AD34-546A278355B1} = {C2F43DB7-AAA0-4687-9897-5D686EC91245} + {2D265650-B1EC-4F8D-B043-A2E3DCC23FD8} = {8A0F718E-2168-4CC7-8F7B-A65508B52B0F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F69D4156-FC22-4B8E-AD72-2A7323D42CC4} @@ -819,6 +886,7 @@ Global GlobalSection(SharedMSBuildProjectFiles) = preSolution IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.projitems*{1609f12c-8216-4e7c-ade0-240bfe160242}*SharedItemsImports = 13 IO.Ably.Shared\IO.Ably.Shared.projitems*{24b6fc97-9d3d-46ae-b5cb-47458354bee1}*SharedItemsImports = 4 + IO.Ably.Shared\IO.Ably.Shared.projitems*{2d265650-b1ec-4f8d-b043-a2e3dcc23fd8}*SharedItemsImports = 4 IO.Ably.Shared\IO.Ably.Shared.projitems*{3553e1b2-8f1f-4e83-9524-08e702c14fcf}*SharedItemsImports = 13 IO.Ably.Tests.Shared\IO.Ably.Tests.Shared.projitems*{567feef7-41af-42f2-ad34-546a278355b1}*SharedItemsImports = 4 IO.Ably.Shared\IO.Ably.Shared.projitems*{8bb7b13c-e9f4-4d1b-bccc-af890a23ece6}*SharedItemsImports = 4 From 6b5f050c4c1498462e44e6d12401606ce83f719a Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 14 Apr 2023 17:34:48 +0530 Subject: [PATCH 34/72] Added script to install latest version of mono on macOS CI --- .github/workflows/integration-test-macos.yml | 1 + tools/mono-install.sh | 26 ++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 tools/mono-install.sh diff --git a/.github/workflows/integration-test-macos.yml b/.github/workflows/integration-test-macos.yml index 7916f9591..56297f422 100644 --- a/.github/workflows/integration-test-macos.yml +++ b/.github/workflows/integration-test-macos.yml @@ -26,6 +26,7 @@ jobs: run: dotnet tool restore - name: Restore packages run: | + ./tools/mono-install.sh nuget restore ./src/IO.Ably.Xamarin.sln - name: Build Xamarin projects run: ./build.sh Build.Xamarin diff --git a/tools/mono-install.sh b/tools/mono-install.sh new file mode 100644 index 000000000..03b018c49 --- /dev/null +++ b/tools/mono-install.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -ex + +# Get the macos universal pkg installer download url +# for the version you want to install from: https://download.mono-project.com/archive/ +# and set it here as the value of this variable: +MONO_MACOS_PKG_DOWNLOAD_URL='https://download.mono-project.com/archive/6.12.0/macos-10-universal/MonoFramework-MDK-6.12.0.190.macos10.xamarin.universal.pkg' + +# create a temp dir and cd into it +mkdir -p /tmp/mono-install +cd /tmp/mono-install + +# debug: mono version before the install +mono --version + +# download mono mac installer (pkg) +wget -q -O ./mono-installer.pkg "$MONO_MACOS_PKG_DOWNLOAD_URL" + +# install it +sudo installer -pkg ./mono-installer.pkg -target / + +# debug: mono version after install, just to confirm it did overwrite the original version +mono --version + +# just for fun print this symlink too, which should point to the version we just installed +ls -alh /Library/Frameworks/Mono.framework/Versions/Current From 1b83cdaa6cf3c402d9eecf7d72be79c32cf2c733 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 14 Apr 2023 17:41:14 +0530 Subject: [PATCH 35/72] Marked mono script as executable --- .github/workflows/integration-test-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration-test-macos.yml b/.github/workflows/integration-test-macos.yml index 56297f422..a5062ccbb 100644 --- a/.github/workflows/integration-test-macos.yml +++ b/.github/workflows/integration-test-macos.yml @@ -26,6 +26,7 @@ jobs: run: dotnet tool restore - name: Restore packages run: | + chmod +x ./tools/mono-install.sh ./tools/mono-install.sh nuget restore ./src/IO.Ably.Xamarin.sln - name: Build Xamarin projects From 4bb97f9dd8b2a289f8267ecb33d15d01b70e27a4 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 00:46:43 +0530 Subject: [PATCH 36/72] Added osIdentifier method to detect the OS of the underlying platform --- src/IO.Ably.Shared/Defaults.cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/IO.Ably.Shared/Defaults.cs b/src/IO.Ably.Shared/Defaults.cs index 0cfbc6da5..8c2d296b9 100644 --- a/src/IO.Ably.Shared/Defaults.cs +++ b/src/IO.Ably.Shared/Defaults.cs @@ -3,6 +3,7 @@ using System.Globalization; using System.Linq; using System.Reflection; +using System.Runtime.InteropServices; using System.Text; using IO.Ably.Transport; @@ -130,6 +131,30 @@ internal static string DotnetRuntimeIdentifier() return string.Empty; } + internal static string OsIdentifier() + { +#if NETCOREAPP + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + return "netcoreapp-macOS"; + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + return "netcoreapp-linux"; + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + return "netcoreapp-windows"; + } +#elif NET5_0_OR_GREATER + + +#endif + return string.Empty; + } + internal static string AblyAgentIdentifier(Dictionary additionalAgents) { string GetAgentComponentString(string product, string version) From 74f8fdb8d783da8a05a898513ebb14fdb6434aa4 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 02:21:25 +0530 Subject: [PATCH 37/72] Fixed notification publisher loglevel --- examples/NotificationsPublisher/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/NotificationsPublisher/Program.cs b/examples/NotificationsPublisher/Program.cs index 1202806ca..981fae502 100644 --- a/examples/NotificationsPublisher/Program.cs +++ b/examples/NotificationsPublisher/Program.cs @@ -281,7 +281,7 @@ void InitialiseAbly(string key) var options = new ClientOptions(key) { LogHandler = Logger, - LogLevel = LogLevel.Debug, + LogLevel = LogLevel.Warning, AutoConnect = false }; Ably = new AblyRealtime(options); From af7fb51331235327aa839db7c07d46213e66afeb Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 02:22:36 +0530 Subject: [PATCH 38/72] Added agent header for identifying the underlying operating system --- src/IO.Ably.NETStandard20/Platform.cs | 4 -- src/IO.Ably.Shared/Defaults.cs | 42 +++++++++++++++---- .../ConnectionParameterSpecs.cs | 4 +- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/src/IO.Ably.NETStandard20/Platform.cs b/src/IO.Ably.NETStandard20/Platform.cs index 8b8b0ba31..42372dda1 100644 --- a/src/IO.Ably.NETStandard20/Platform.cs +++ b/src/IO.Ably.NETStandard20/Platform.cs @@ -17,10 +17,6 @@ static Platform() internal static bool HookedUpToNetworkEvents { get; private set; } // Defined as per https://learn.microsoft.com/en-us/dotnet/standard/frameworks#preprocessor-symbols - // TODO : Get runtime platform info ( android, iOS ) using https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device/information?view=net-maui-7.0&tabs=windows - // TODO : Get all operating system from https://stackoverflow.com/questions/38790802/determine-operating-system-in-net-core - // System.OperatingSystem.IsWindows(), System.OperatingSystem.IsIOS() - // Also, update OS detection for dotnetcore #if NET6_0 public string PlatformId => "net6.0"; #elif NET7_0 diff --git a/src/IO.Ably.Shared/Defaults.cs b/src/IO.Ably.Shared/Defaults.cs index 8c2d296b9..0052a99a6 100644 --- a/src/IO.Ably.Shared/Defaults.cs +++ b/src/IO.Ably.Shared/Defaults.cs @@ -131,26 +131,51 @@ internal static string DotnetRuntimeIdentifier() return string.Empty; } + // Get operating system as per https://stackoverflow.com/a/66618677 + // Preprocessors defined as per https://learn.microsoft.com/en-us/dotnet/standard/frameworks#preprocessor-symbols + // Related link - https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device/information?view=net-maui-7.0&tabs=windows internal static string OsIdentifier() { -#if NETCOREAPP - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) +#if NET5_0_OR_GREATER + if (OperatingSystem.IsWindows()) { - return "netcoreapp-macOS"; + return "dotnet-windows"; } - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + if (OperatingSystem.IsLinux()) { - return "netcoreapp-linux"; + return "dotnet-linux"; } - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + if (OperatingSystem.IsMacOS()) { - return "netcoreapp-windows"; + return "dotnet-macOS"; } -#elif NET5_0_OR_GREATER + if (OperatingSystem.IsAndroid()) + { + return "dotnet-android"; + } + if (OperatingSystem.IsIOS()) + { + return "dotnet-iOS"; + } + + if (OperatingSystem.IsTvOS()) + { + return "dotnet-tvOS"; + } + + if (OperatingSystem.IsWatchOS()) + { + return "dotnet-watchOS"; + } + + if (OperatingSystem.IsBrowser()) + { + return "dotnet-browser"; + } #endif return string.Empty; } @@ -173,6 +198,7 @@ void AddAgentIdentifier(ICollection currentAgentComponents, string produ var agentComponents = new List(); AddAgentIdentifier(agentComponents, AblySdkIdentifier); AddAgentIdentifier(agentComponents, DotnetRuntimeIdentifier()); + AddAgentIdentifier(agentComponents, OsIdentifier()); if (additionalAgents == null) { diff --git a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs index 140ada310..0a7f11332 100644 --- a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs @@ -130,7 +130,8 @@ public async Task ShouldSetTransportAblyAgentHeader() string[] keys = { "ably-dotnet/", - Defaults.DotnetRuntimeIdentifier() + Defaults.DotnetRuntimeIdentifier(), + Defaults.OsIdentifier() }; agentValues.Should().HaveCount(keys.Length); @@ -159,6 +160,7 @@ public async Task ShouldSetTransportCustomAblyAgentHeader() { "ably-dotnet/", Defaults.DotnetRuntimeIdentifier(), + Defaults.OsIdentifier(), "agent1", "agent2", }; From 81cb7b379a01bb1de05ea0f49979b2b18baaa73f Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 02:25:23 +0530 Subject: [PATCH 39/72] Removed unncessary target for netcoreapp from dotnet tests --- src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj b/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj index 85f95bcab..4c5436e5b 100644 --- a/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj +++ b/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj @@ -6,13 +6,7 @@ 8 - - netcoreapp3.1 - ..\IO.Ably.Tests.ruleset - 8 - - - + 1701;1702;SA0001;NU1701 From c33e2a2137cbb4e3e59998a9c42c7f3fa89c176b Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 02:37:42 +0530 Subject: [PATCH 40/72] Fixed tests for os identifier --- src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs index 278733114..391fd7db2 100644 --- a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs @@ -98,7 +98,8 @@ public async Task WhenCallingUrl_AddsDefaultAblyAgentHeader() string[] keys = { "ably-dotnet/", - Defaults.DotnetRuntimeIdentifier() + Defaults.DotnetRuntimeIdentifier(), + Defaults.OsIdentifier() }; agentValues.Should().HaveCount(keys.Length); @@ -135,6 +136,7 @@ public async Task WhenCallingUrl_AddsCustomizedAblyAgentHeader() { "ably-dotnet/", Defaults.DotnetRuntimeIdentifier(), + Defaults.OsIdentifier(), "agent1", "agent2", }; From eda6206ae1b1af2061ebf77a1b66461045439d08 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 02:56:49 +0530 Subject: [PATCH 41/72] Removed unnecessary top level build.fsx file --- build.fsx | 538 ------------------------------------------------------ 1 file changed, 538 deletions(-) delete mode 100644 build.fsx diff --git a/build.fsx b/build.fsx deleted file mode 100644 index 8c049d1d6..000000000 --- a/build.fsx +++ /dev/null @@ -1,538 +0,0 @@ -#r "paket: -nuget Fake.Core.Target -nuget Fake.Core.CommandLineParsing -nuget Fake.DotNet.AssemblyInfoFile -nuget Fake.IO.FileSystem -nuget Fake.DotNet.Cli -nuget Fake.DotNet.MSBuild -nuget Fake.DotNet.Testing.XUnit2 -nuget Fake.DotNet.NuGet -//" - -#r "System.Core.dll" -#r "System.Xml.Linq.dll" -// include Fake modules, see Fake modules section - -open Fake.Core.TargetOperators -open Fake.Core.Operators -open Fake.Core -open Fake.IO.Globbing.Operators -open Fake.DotNet -open Fake.IO -open Fake -open System -open Fake.DotNet.Testing -open Fake.DotNet.Testing.XUnit2 -open System.Xml.Linq -open System.Xml.XPath -open FSharp.Core -open Fake.Testing.Common -open Fake.DotNet.NuGet -open System.Text.RegularExpressions - -let currentDir = __SOURCE_DIRECTORY__ -let netstandardTestDir = "src/IO.Ably.Tests.DotNET" -let xUnit2 = XUnit2.run - -let NetStandardSolution = "src/IO.Ably.NetStandard.sln" -let NetFrameworkSolution = "src/IO.Ably.NetFramework.sln" -let XamarinSolution = "src/IO.Ably.Xamarin.sln" -let buildDir = Path.combine currentDir "build" -let srcDir = Path.combine currentDir "src" -let testResultsDir = Path.combine buildDir "tests" -let packageDir = Path.combine buildDir "package" -let configuration = DotNet.Release -let packageSolution = "src/IO.Ably.Package.sln" -let pushPackageSolution = "src/IO.Ably.PackagePush.sln" -let buildMode = Environment.environVarOrDefault "buildMode" "Release" - -let cli = """ -usage: prog [options] - -options: - -t Target - -v Version -""" - -// retrieve the fake 5 context information -let ctx = Context.forceFakeContext () -// get the arguments -let args = ctx.Arguments -let parser = Docopt(cli) -let parsedArguments = parser.Parse(args |> List.toArray) - -let version = match DocoptResult.tryGetArgument "-v" parsedArguments with - | None -> "" - | Some version -> version - -let mergeJsonNet path outputPath = - let target = Path.combine path "IO.Ably.dll" - let docsFile = Path.combine path "IO.Ably.xml" - let out = Path.combine outputPath "IO.Ably.dll" - - Directory.ensure outputPath - - CreateProcess.fromRawCommand "./tools/ilrepack.exe" - [ - "/lib:" + path - "/targetplatform:v4" - "/internalize" - "/attr:" + target - "/keyfile:IO.Ably.snk" - "/parallel" - "/out:" + out - target - Path.combine path "Newtonsoft.Json.dll" - ] - |> Proc.run // start with the above configuration - |> ignore - - // Copy the xml docs - if File.exists docsFile then Shell.copy outputPath [ docsFile ] - - -// *** Define Targets *** -Target.create "Clean" (fun _ -> - Trace.log (sprintf "Current dir: %s" currentDir) - Trace.log " --- Removing build folder ---" - Directory.delete(buildDir) - Directory.delete(packageDir) - - Directory.ensure testResultsDir - Directory.ensure packageDir -) - -Target.create "Version" (fun _ -> - AssemblyInfoFile.createCSharp "./src/CommonAssemblyInfo.cs" - [ - AssemblyInfo.Company "Ably" - AssemblyInfo.Product "Ably .NET Library" - AssemblyInfo.Version version - AssemblyInfo.FileVersion version - ] -) - - -let nugetRestore solutionFile = - CreateProcess.fromRawCommand "./tools/nuget.exe" ["restore"; solutionFile] - |> Proc.run // start with the above configuration - -Target.create "Restore" (fun _ -> - if Environment.isWindows then - nugetRestore "src/IO.Ably.sln" |> ignore - - CreateProcess.fromRawCommand "dotnet" ["restore"; "src/IO.Ably.sln"] - |> Proc.run |> ignore -) - -Target.create "Restore Xamarin" (fun _ -> - - if not Environment.isWindows then - CreateProcess.fromRawCommand "ls" ["../packages"] |> Proc.run |> ignore - - let setParams (defaults:MSBuildParams) = - { defaults with - Verbosity = Some(Quiet) - Targets = ["Restore"] - Properties = - [ - "Configuration", buildMode - "RestorePackages", "True" - ] - } - MSBuild.build setParams NetFrameworkSolution - - -) - -Target.create "NetFramework - Build" (fun _ -> - let setParams (defaults:MSBuildParams) = - { defaults with - Verbosity = Some(Quiet) - Targets = ["Build"] - Properties = - [ - "Optimize", "True" - "DebugSymbols", "True" - "Configuration", buildMode - ] - } - MSBuild.build setParams NetFrameworkSolution -) - -Target.create "Xamarin - Build" (fun _ -> - let setParams (defaults:MSBuildParams) = - { defaults with - Verbosity = Some(Quiet) - Targets = ["Build"] - Properties = - [ - "Optimize", "True" - "DebugSymbols", "True" - "Configuration", buildMode - ] - } - MSBuild.build setParams XamarinSolution -) - -type TestRun = - | Method of string - | UnitTests - | IntegrationTests - -let findNextTrxTestPath (resultsPath:string) = - [ 1 .. 100 ] - |> Seq.map ( fun i -> resultsPath.Replace(".trx", sprintf "-%d.trx" i)) - |> Seq.find (File.exists >> not) - -let findNextTestPath (resultsPath:string) = - [ 1 .. 100 ] - |> Seq.map ( fun i -> resultsPath.Replace(".xml", sprintf "-%d.xml" i)) - |> Seq.find (File.exists >> not) - -let trimTestMethod (testMethod:string) = - match testMethod.Contains("(") with - | true -> testMethod.Substring(0, testMethod.IndexOf("(")) - | false -> testMethod - -let findFailedXUnitTests (resultsPath:string) = - let doc = XDocument.Load(resultsPath) - let nodes = doc.XPathSelectElements("//test-case[@success='False']") - - nodes - |> Seq.map (fun node -> (node.Attribute(XName.Get("name"))).Value) - |> Seq.map trimTestMethod - -let findFailedDotnetTestTests (resultsPath:string) = - let xml = File.readAsString resultsPath - let tidyXml = Regex.Replace(xml, @"xmlns=\""[^\""]+\""", "") // Remove the namespace to make xpath queries easier - let doc = XDocument.Parse(tidyXml); - let nodes = doc.XPathSelectElements("//UnitTestResult[@outcome='Failed']") - printfn "Nodes found: %d" (nodes |> Seq.length) - - nodes - |> Seq.map (fun node -> (node.Attribute(XName.Get("testName"))).Value) - |> Seq.map trimTestMethod - |> Seq.toList - -let runStandardTestsWithOptions testToRun (failOnError:bool) = - Directory.ensure testResultsDir - Trace.log " --- Testing net core version --- " - let project = Path.combine currentDir "src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj" - - match testToRun with - | Method testMethodName -> - let logsPath = findNextTrxTestPath(Path.combine testResultsDir "tests-netstandard.trx") - DotNet.test (fun opts -> { opts with Configuration = configuration - Filter = Some testMethodName - Logger = Some( "trx;logfilename=" + logsPath) - }) - project - logsPath - | UnitTests -> - let logsPath = Path.combine testResultsDir "tests-netstandard-unit.trx" - let mutable filters = [ "type!=integration" ] - if Environment.isLinux then filters <- filters @ ["linux!=skip"] - - try - DotNet.test (fun opts -> { opts with Configuration = configuration - Filter = Some (filters |> String.concat "&") - Logger = Some( "trx;logfilename=" + logsPath) - }) - project - with - | :? Fake.DotNet.MSBuildException -> - printfn "Not all unit tests passed. FailOnError is %b" failOnError |> ignore - if failOnError then reraise() - - logsPath - | IntegrationTests -> - let logsPath = Path.combine testResultsDir "tests-netstandard-integration.trx" - try - DotNet.test (fun opts -> { opts with Configuration = configuration - Filter = Some ("type=integration") - Logger = Some( "trx;logfilename=" + logsPath) - }) - project - with - | :? Fake.DotNet.MSBuildException -> - printfn "Not all integration tests passed the first time" - if failOnError then reraise() - - - logsPath - -let runStandardTests testToRun = - runStandardTestsWithOptions testToRun true - -let runStandardTestsAllowRetry testToRun = - runStandardTestsWithOptions testToRun false - -let runFrameworkTests testToRun errorLevel = - Directory.ensure testResultsDir - let testDir = Path.combine currentDir "src/IO.Ably.Tests.NETFramework/bin/Release" - let testDll = !! (Path.combine testDir "*.Tests.*.dll") - - match testToRun with - | Method testMethodName -> - let logsPath = findNextTestPath(Path.combine testResultsDir "xunit-netframework.xml") - testDll - |> xUnit2 (fun p -> { p with NUnitXmlOutputPath = Some ( logsPath) - Method = Some (trimTestMethod testMethodName) - ErrorLevel = errorLevel - }) - logsPath - | UnitTests -> - let logsPath = Path.combine testResultsDir "xunit-netframework-unit.xml" - testDll - |> xUnit2 (fun p -> { p with NUnitXmlOutputPath = Some logsPath - ExcludeTraits = [ ("type", "integration")] - ErrorLevel = errorLevel - }) - logsPath - | IntegrationTests -> - let logsPath = Path.combine testResultsDir "xunit-netframework-integration.xml" - testDll - |> xUnit2 (fun p -> { p with NUnitXmlOutputPath = Some logsPath - IncludeTraits = [ ("type", "integration")] - TimeOut = TimeSpan.FromMinutes(20.) - Parallel = ParallelMode.Collections - ErrorLevel = errorLevel - }) - logsPath - -Target.create "NetFramework.Integration.Rerun" (fun _ -> - - let setParams (defaults:MSBuildParams) = - { defaults with - Verbosity = Some(Quiet) - Targets = ["Build"] - Properties = - [ - "Optimize", "True" - "DebugSymbols", "True" - "Configuration", buildMode - ] - } - MSBuild.build setParams NetFrameworkSolution - - - let logsPath = Path.combine testResultsDir "xunit-netframework-integration.xml" - - let failedTestNames = findFailedXUnitTests logsPath - - for test in failedTestNames do - runFrameworkTests (Method test) TestRunnerErrorLevel.Error |> ignore -) - -Target.create "NetFramework - Unit Tests" (fun _ -> - - runFrameworkTests UnitTests TestRunnerErrorLevel.Error |> ignore -) - -Target.create "NetFramework - Integration Tests" ( fun _ -> - - let logs = runFrameworkTests IntegrationTests TestRunnerErrorLevel.DontFailBuild - - let failedTestNames = findFailedXUnitTests logs - - for test in failedTestNames do - runFrameworkTests (Method test) TestRunnerErrorLevel.Error |> ignore -) - -Target.create "NetStandard - Build" (fun _ -> - DotNet.build (fun opts -> { - opts with Configuration = configuration - }) NetStandardSolution -) - -Target.create "NetStandard - Unit Tests" (fun _ -> - runStandardTests UnitTests |> ignore -) - -Target.create "NetStandard - Unit Tests with retry" (fun _ -> - let logs = runStandardTestsAllowRetry UnitTests - - let failedTestNames = findFailedDotnetTestTests logs - - for test in failedTestNames do - runStandardTests (Method test) |> ignore -) - -Target.create "NetStandard - Integration Tests" (fun _ -> - - let logs = runStandardTestsAllowRetry IntegrationTests - - let failedTestNames = findFailedDotnetTestTests logs - - for test in failedTestNames do - runStandardTests (Method test) |> ignore -) - -// This is duplicated before of Fake's build dependency doesn't allow -// This this target to be run independent of the unit tests -Target.create "NetStandard - Integration Tests with retry" (fun _ -> - - let logs = runStandardTestsAllowRetry IntegrationTests - - let failedTestNames = findFailedDotnetTestTests logs - - for test in failedTestNames do - runStandardTests (Method test) |> ignore -) - -Target.create "Package - Build All" (fun _ -> - let setParams (defaults:MSBuildParams) = - { defaults with - Verbosity = Some(Quiet) - Targets = ["Build"] - Properties = - [ - "Optimize", "True" - "DebugSymbols", "True" - "Configuration", buildMode - "StyleCopEnabled", "True" - "Package", "True" - "DefineConstants", "PACKAGE" - ] - } - MSBuild.build setParams packageSolution -) - -Target.create "Push Package - Build All" (fun _ -> - let setParams (defaults:MSBuildParams) = - { defaults with - Verbosity = Some(Quiet) - Targets = ["Build"] - Properties = - [ - "Optimize", "True" - "DebugSymbols", "True" - "Configuration", "Package" - "StyleCopEnabled", "True" - "Package", "True" - "DefineConstants", "PACKAGE" - ] - } - MSBuild.build setParams pushPackageSolution -) - -Target.create "Package - Merge json.net" (fun _ -> - let projectsToMerge = [ "IO.Ably.Android"; "IO.Ably.iOS"; "IO.Ably.NETFramework" ] - let binFolderPaths = projectsToMerge - |> Seq.map (Path.combine "src") - |> Seq.map (fun path -> sprintf "%s/bin/%s" path buildMode) - - // Copy all IO.Ably* files to the `packaged folder` - binFolderPaths - |> Seq.iter ( fun path -> !! (Path.combine path "IO.Ably*") |> Shell.copy (Path.combine path "packaged")) - - // Merge newtonsoft json into ably.dll and overwrite IO.Ably.dll in the packaged folder with the merged one - binFolderPaths - |> Seq.iter ( fun path -> mergeJsonNet path (Path.combine path "packaged")) - -) - -Target.create "Package - Create nuget" (fun _ -> - CreateProcess.fromRawCommand "./tools/nuget.exe" - [ - "pack" - "./nuget/io.ably.nuspec" - "-properties" - sprintf "version=%s;configuration=Release" version - ] - |> Proc.run // start with the above configuration - |> ignore -) - -Target.create "Package - Push" (fun _ -> - CreateProcess.fromRawCommand "nuget" - [ - "pack" - "./nuget/io.ably.push.android.nuspec" - "-properties" - sprintf "version=%s;configuration=Release" version - ] - |> Proc.run // start with the above configuration - |> ignore - - CreateProcess.fromRawCommand "nuget" - [ - "pack" - "./nuget/io.ably.push.ios.nuspec" - "-properties" - sprintf "version=%s;configuration=Release" version - ] - |> Proc.run // start with the above configuration - |> ignore -) - -Target.create "Prepare" ignore -Target.create "Build.NetFramework" ignore -Target.create "Build.NetStandard" ignore -Target.create "Build.Xamarin" ignore - -Target.create "Test.NetFramework.Unit" ignore -Target.create "Test.NetFramework.Integration" ignore - -Target.create "Test.NetStandard.Unit" ignore -Target.create "Test.NetStandard.Unit.WithRetry" ignore -Target.create "Test.NetStandard.Integration.WithRetry" ignore -Target.create "Test.NetStandard.Integration" ignore - -Target.create "Package" ignore -Target.create "PushPackage" ignore - - - -"Clean" - ==> "Restore" - ==> "Prepare" - -"Prepare" - ==> "NetFramework - Build" - ==> "Build.NetFramework" - -"Prepare" - ==> "Restore Xamarin" - ==> "Xamarin - Build" - ==> "Build.Xamarin" - -"Prepare" - ==> "NetStandard - Build" - ==> "Build.NetStandard" - -"Prepare" - ==> "Version" - ==> "Package - Build All" - ==> "Package - Merge json.net" - ==> "Package - Create nuget" - ==> "Package" - -"Prepare" - ==> "Version" - ==> "Push Package - Build All" - ==> "Package - Push" - ==> "PushPackage" - -"Build.NetFramework" - ==> "NetFramework - Unit Tests" - ==> "Test.NetFramework.Unit" - -"Build.NetFramework" - ==> "NetFramework - Integration Tests" - ==> "Test.NetFramework.Integration" - -"Build.NetStandard" - ==> "NetStandard - Unit Tests" - ==> "Test.NetStandard.Unit" - -"Build.NetStandard" - ==> "NetStandard - Integration Tests" - ==> "Test.NetStandard.Integration" - -"Build.NetStandard" - ==> "NetStandard - Unit Tests with retry" - ==> "Test.NetStandard.Unit.WithRetry" - -Target.runOrDefaultWithArguments "Build.NetFramework" From 769d862b16f8342110a322452a1db0b0b77c6b96 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 03:01:36 +0530 Subject: [PATCH 42/72] Fixed package push script, reusing buish script instead --- package-push.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package-push.sh b/package-push.sh index e98abbec5..db8f626f2 100755 --- a/package-push.sh +++ b/package-push.sh @@ -9,6 +9,5 @@ if [ $# -eq 0 ] then echo "Provide latest version number like package-push.sh 1.2.8" else - dotnet tool restore - dotnet fake run build.fsx -t PushPackage -v $1 + ./build.sh PushPackage -v $1 fi From c7b21107945aba080f81c0096b3c324a66a7eccf Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 03:30:24 +0530 Subject: [PATCH 43/72] Updated supported platforms as per netstandard 2.0 compatibility chart --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 44627403e..5f50705ca 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,14 @@ This is a .NET client library for Ably. The library currently targets the [Ably ## Supported platforms -* .NET Standard 2.0+ +* [.NET Standard 2.0+](https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0) * .NET 6.x, 7.x (MAUI supported) -* .NET (Core) 3.1+ -* .NET Framework 4.8 +* .NET Framework 4.6+ +* .NET (Core) 2.0+ * Mono 5.4+ * [Xamarin.Android 8.0+](https://developer.xamarin.com/releases/android/xamarin.android_8/xamarin.android_8.0/) -* [Xamarin.iOS 11.4+](https://developer.xamarin.com/releases/ios/xamarin.ios_11/xamarin.ios_11.4/) +* [Xamarin.iOS 10.14+](https://developer.xamarin.com/releases/ios/xamarin.ios_10/xamarin.ios_10.14/) +* Xamarin.Mac 3.8+ ## Push notification From 855ab605f3486f909c1bc2cd6bcad8f561138d68 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 12:29:38 +0530 Subject: [PATCH 44/72] Fixed failing tests for agent headers --- .../ConnectionParameterSpecs.cs | 20 ++++++++++++------- .../Rest/AblyHttpClientSpecs.cs | 20 ++++++++++++------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs index 0a7f11332..572b5553a 100644 --- a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs @@ -127,15 +127,19 @@ public async Task ShouldSetTransportAblyAgentHeader() LastCreatedTransport.Parameters.GetParams().Should().ContainKey(Defaults.AblyAgentHeader); var agentValues = LastCreatedTransport.Parameters.GetParams()[Defaults.AblyAgentHeader].Split(' '); - string[] keys = + var keys = new List() { "ably-dotnet/", Defaults.DotnetRuntimeIdentifier(), - Defaults.OsIdentifier() + Defaults.OsIdentifier(), + "agent1", + "agent2", }; - agentValues.Should().HaveCount(keys.Length); - for (int i = 0; i < keys.Length; ++i) + keys.RemoveAll(s => s == string.Empty); + + agentValues.Should().HaveCount(keys.Count); + for (var i = 0; i < keys.Count; ++i) { agentValues[i].StartsWith(keys[i]).Should().BeTrue($"'{agentValues[i]}' should start with '{keys[i]}'"); } @@ -156,7 +160,7 @@ public async Task ShouldSetTransportCustomAblyAgentHeader() LastCreatedTransport.Parameters.GetParams().Should().ContainKey(Defaults.AblyAgentHeader); var agentValues = LastCreatedTransport.Parameters.GetParams()[Defaults.AblyAgentHeader].Split(' '); - string[] keys = + var keys = new List() { "ably-dotnet/", Defaults.DotnetRuntimeIdentifier(), @@ -165,8 +169,10 @@ public async Task ShouldSetTransportCustomAblyAgentHeader() "agent2", }; - agentValues.Should().HaveCount(keys.Length); - for (var i = 0; i < keys.Length; ++i) + keys.RemoveAll(s => s == string.Empty); + + agentValues.Should().HaveCount(keys.Count); + for (var i = 0; i < keys.Count; ++i) { agentValues[i].StartsWith(keys[i]).Should().BeTrue($"'{agentValues[i]}' should start with '{keys[i]}'"); } diff --git a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs index 391fd7db2..51a588803 100644 --- a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs @@ -95,15 +95,19 @@ public async Task WhenCallingUrl_AddsDefaultAblyAgentHeader() values.Should().HaveCount(1); string[] agentValues = values[0].Split(' '); - string[] keys = + var keys = new List() { "ably-dotnet/", Defaults.DotnetRuntimeIdentifier(), - Defaults.OsIdentifier() + Defaults.OsIdentifier(), + "agent1", + "agent2", }; - agentValues.Should().HaveCount(keys.Length); - for (int i = 0; i < keys.Length; ++i) + keys.RemoveAll(s => s == string.Empty); + + agentValues.Should().HaveCount(keys.Count); + for (var i = 0; i < keys.Count; ++i) { agentValues[i].StartsWith(keys[i]).Should().BeTrue($"'{agentValues[i]}' should start with '{keys[i]}'"); } @@ -132,7 +136,7 @@ public async Task WhenCallingUrl_AddsCustomizedAblyAgentHeader() values.Should().HaveCount(1); string[] agentValues = values[0].Split(' '); - string[] keys = + var keys = new List() { "ably-dotnet/", Defaults.DotnetRuntimeIdentifier(), @@ -141,8 +145,10 @@ public async Task WhenCallingUrl_AddsCustomizedAblyAgentHeader() "agent2", }; - agentValues.Should().HaveCount(keys.Length); - for (var i = 0; i < keys.Length; ++i) + keys.RemoveAll(s => s == string.Empty); + + agentValues.Should().HaveCount(keys.Count); + for (var i = 0; i < keys.Count; ++i) { agentValues[i].StartsWith(keys[i]).Should().BeTrue($"'{agentValues[i]}' should start with '{keys[i]}'"); } From 60e595816e9fbb05f3768263e29026264672e76c Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 16:33:32 +0530 Subject: [PATCH 45/72] Added links to the famous dotnet tools --- .config/dotnet-tools.json | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 1a7da45f6..b9fc50005 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -6,25 +6,29 @@ "version": "7.2.0", "commands": [ "paket" - ] + ], + "_link": "https://github.com/fsprojects/Paket" }, "fake-cli": { "version": "5.23.1", "commands": [ "fake" - ] + ], + "_link": "https://github.com/fsprojects/FAKE" }, "fsdocs-tool": { "version": "17.2.0", "commands": [ "fsdocs" - ] + ], + "_link": "https://github.com/fsprojects/FSharp.Formatting" }, "fantomas": { "version": "5.1.5", "commands": [ "fantomas" - ] + ], + "_link": "https://github.com/fsprojects/fantomas" } } -} +} \ No newline at end of file From afba4c4d9ff2c7748e66dede7e3c284c86184bec Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 20:00:55 +0530 Subject: [PATCH 46/72] Formatted build script using fantomas --- build-script/build.fs | 657 ++++++++++++++++++++---------------------- 1 file changed, 320 insertions(+), 337 deletions(-) diff --git a/build-script/build.fs b/build-script/build.fs index 190979052..121575ed8 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -1,6 +1,6 @@ open Fake.Core.TargetOperators open Fake.Core -open Fake.IO.Globbing.Operators +open Fake.IO.Globbing.Operators open Fake.DotNet open Fake.IO open Fake @@ -14,7 +14,7 @@ open Fake.Testing.Common open System.IO open System.Text.RegularExpressions -let currentDir = DirectoryInfo(__SOURCE_DIRECTORY__).Parent.FullName; +let currentDir = DirectoryInfo(__SOURCE_DIRECTORY__).Parent.FullName let netstandardTestDir = "src/IO.Ably.Tests.DotNET" let xUnit2 = XUnit2.run @@ -30,11 +30,14 @@ let configuration = DotNet.Release let packageSolution = "src/IO.Ably.Package.sln" let pushPackageSolution = "src/IO.Ably.PackagePush.sln" let buildMode = Environment.environVarOrDefault "buildMode" "Release" + type TestRun = | Method of string | UnitTests | IntegrationTests -let cli = """ + +let cli = + """ Usage: prog [options] @@ -43,7 +46,7 @@ Options: -v Version """ -let initTargets (argv) = +let initTargets (argv) = // retrieve the fake 5 context information @@ -55,299 +58,300 @@ let initTargets (argv) = let parsedArguments = parser.Parse(argv) - let version = match DocoptResult.tryGetArgument "-v" parsedArguments with - | None -> "" - | Some version -> version - - let mergeJsonNet path outputPath = - let target = Path.combine path "IO.Ably.dll" - let docsFile = Path.combine path "IO.Ably.xml" - let out = Path.combine outputPath "IO.Ably.dll" - - Directory.ensure outputPath - - CreateProcess.fromRawCommand "./tools/ilrepack.exe" - [ - "/lib:" + path - "/targetplatform:v4" - "/internalize" - "/attr:" + target - "/keyfile:IO.Ably.snk" - "/parallel" - "/out:" + out - target - Path.combine path "Newtonsoft.Json.dll" - ] - |> Proc.run // start with the above configuration - |> ignore - - // Copy the xml docs - if File.exists docsFile then Shell.copy outputPath [ docsFile ] + let version = + match DocoptResult.tryGetArgument "-v" parsedArguments with + | None -> "" + | Some version -> version + + let mergeJsonNet path outputPath = + let target = Path.combine path "IO.Ably.dll" + let docsFile = Path.combine path "IO.Ably.xml" + let out = Path.combine outputPath "IO.Ably.dll" + + Directory.ensure outputPath + + CreateProcess.fromRawCommand + "./tools/ilrepack.exe" + [ "/lib:" + path + "/targetplatform:v4" + "/internalize" + "/attr:" + target + "/keyfile:IO.Ably.snk" + "/parallel" + "/out:" + out + target + Path.combine path "Newtonsoft.Json.dll" ] + |> Proc.run // start with the above configuration + |> ignore + + // Copy the xml docs + if File.exists docsFile then + Shell.copy outputPath [ docsFile ] // *** Define Targets *** Target.create "Clean" (fun _ -> - Trace.log (sprintf "Current dir: %s" currentDir) - Trace.log " --- Removing build folder ---" - Directory.delete(buildDir) - Directory.delete(packageDir) - - Directory.ensure testResultsDir - Directory.ensure packageDir - ) - - Target.create "Version" (fun _ -> - AssemblyInfoFile.createCSharp "./src/CommonAssemblyInfo.cs" - [ - AssemblyInfo.Company "Ably" + Trace.log (sprintf "Current dir: %s" currentDir) + Trace.log " --- Removing build folder ---" + Directory.delete (buildDir) + Directory.delete (packageDir) + + Directory.ensure testResultsDir + Directory.ensure packageDir) + + Target.create "Version" (fun _ -> + AssemblyInfoFile.createCSharp + "./src/CommonAssemblyInfo.cs" + [ AssemblyInfo.Company "Ably" AssemblyInfo.Product "Ably .NET Library" AssemblyInfo.Version version - AssemblyInfo.FileVersion version - ] - ) + AssemblyInfo.FileVersion version ]) - let nugetRestore solutionFile = - CreateProcess.fromRawCommand "./tools/nuget.exe" ["restore"; solutionFile] - |> Proc.run // start with the above configuration + let nugetRestore solutionFile = + CreateProcess.fromRawCommand "./tools/nuget.exe" [ "restore"; solutionFile ] + |> Proc.run // start with the above configuration Target.create "Restore" (fun _ -> if Environment.isWindows then - nugetRestore "src/IO.Ably.sln" |> ignore - - CreateProcess.fromRawCommand "dotnet" ["restore"; "src/IO.Ably.sln"] - |> Proc.run |> ignore - ) + nugetRestore "src/IO.Ably.sln" |> ignore + + CreateProcess.fromRawCommand "dotnet" [ "restore"; "src/IO.Ably.sln" ] + |> Proc.run + |> ignore) Target.create "Restore Xamarin" (fun _ -> if not Environment.isWindows then - CreateProcess.fromRawCommand "ls" ["../packages"] |> Proc.run |> ignore - - let setParams (defaults:MSBuildParams) = - { defaults with - Verbosity = Some(Quiet) - Targets = ["Restore"] - Properties = - [ - "Configuration", buildMode - "RestorePackages", "True" - "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 - ] - } - MSBuild.build setParams XamarinSolution - ) + CreateProcess.fromRawCommand "ls" [ "../packages" ] |> Proc.run |> ignore + + let setParams (defaults: MSBuildParams) = + { defaults with + Verbosity = Some(Quiet) + Targets = [ "Restore" ] + Properties = [ "Configuration", buildMode; "RestorePackages", "True"; "dummy", "property" ] } // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 + + MSBuild.build setParams XamarinSolution) Target.create "NetFramework - Build" (fun _ -> - let setParams (defaults:MSBuildParams) = + let setParams (defaults: MSBuildParams) = { defaults with Verbosity = Some(Quiet) - Targets = ["Build"] + Targets = [ "Build" ] Properties = - [ - "Optimize", "True" - "DebugSymbols", "True" - "Configuration", buildMode - "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 - ] - } - MSBuild.build setParams NetFrameworkSolution - ) + [ "Optimize", "True" + "DebugSymbols", "True" + "Configuration", buildMode + "dummy", "property" ] } // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 + + MSBuild.build setParams NetFrameworkSolution) Target.create "Xamarin - Build" (fun _ -> - let setParams (defaults:MSBuildParams) = + let setParams (defaults: MSBuildParams) = { defaults with Verbosity = Some(Quiet) - Targets = ["Build"] + Targets = [ "Build" ] Properties = - [ - "Optimize", "True" - "DebugSymbols", "True" - "Configuration", buildMode - "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 - ] - } - MSBuild.build setParams XamarinSolution - ) + [ "Optimize", "True" + "DebugSymbols", "True" + "Configuration", buildMode + "dummy", "property" ] } // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 + + MSBuild.build setParams XamarinSolution) - let findNextTrxTestPath (resultsPath:string) = - [ 1 .. 100 ] - |> Seq.map ( fun i -> resultsPath.Replace(".trx", sprintf "-%d.trx" i)) + let findNextTrxTestPath (resultsPath: string) = + [ 1..100 ] + |> Seq.map (fun i -> resultsPath.Replace(".trx", sprintf "-%d.trx" i)) |> Seq.find (File.exists >> not) - let findNextTestPath (resultsPath:string) = - [ 1 .. 100 ] - |> Seq.map ( fun i -> resultsPath.Replace(".xml", sprintf "-%d.xml" i)) + let findNextTestPath (resultsPath: string) = + [ 1..100 ] + |> Seq.map (fun i -> resultsPath.Replace(".xml", sprintf "-%d.xml" i)) |> Seq.find (File.exists >> not) - - let trimTestMethod (testMethod:string) = + + let trimTestMethod (testMethod: string) = match testMethod.Contains("(") with | true -> testMethod.Substring(0, testMethod.IndexOf("(")) | false -> testMethod - let findFailedXUnitTests (resultsPath:string) = + let findFailedXUnitTests (resultsPath: string) = let doc = XDocument.Load(resultsPath) let nodes = doc.XPathSelectElements("//test-case[@success='False']") - nodes + nodes |> Seq.map (fun node -> (node.Attribute(XName.Get("name"))).Value) |> Seq.map trimTestMethod - let findFailedDotnetTestTests (resultsPath:string) = + let findFailedDotnetTestTests (resultsPath: string) = let xml = File.readAsString resultsPath let tidyXml = Regex.Replace(xml, @"xmlns=\""[^\""]+\""", "") // Remove the namespace to make xpath queries easier - let doc = XDocument.Parse(tidyXml); + let doc = XDocument.Parse(tidyXml) let nodes = doc.XPathSelectElements("//UnitTestResult[@outcome='Failed']") printfn "Nodes found: %d" (nodes |> Seq.length) - nodes + nodes |> Seq.map (fun node -> (node.Attribute(XName.Get("testName"))).Value) - |> Seq.map trimTestMethod + |> Seq.map trimTestMethod |> Seq.toList - let runStandardTestsWithOptions testToRun (failOnError:bool) = - Directory.ensure testResultsDir - Trace.log " --- Testing net core version --- " - let project = Path.combine currentDir "src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj" - - match testToRun with - | Method testMethodName -> - let logsPath = findNextTrxTestPath(Path.combine testResultsDir "tests-netstandard.trx") - DotNet.test (fun opts -> { opts with Configuration = configuration - Filter = Some testMethodName - Logger = Some( "trx;logfilename=" + logsPath) - }) - project - logsPath - | UnitTests -> - let logsPath = Path.combine testResultsDir "tests-netstandard-unit.trx" - let mutable filters = [ "type!=integration" ] - if Environment.isLinux then filters <- filters @ ["linux!=skip"] - - try - DotNet.test (fun opts -> { opts with Configuration = configuration - Filter = Some (filters |> String.concat "&") - Logger = Some( "trx;logfilename=" + logsPath) - }) - project - with - | :? Fake.DotNet.MSBuildException -> - printfn "Not all unit tests passed. FailOnError is %b" failOnError |> ignore - if failOnError then reraise() - - logsPath - | IntegrationTests -> - let logsPath = Path.combine testResultsDir "tests-netstandard-integration.trx" - try - DotNet.test (fun opts -> { opts with Configuration = configuration - Filter = Some ("type=integration") - Logger = Some( "trx;logfilename=" + logsPath) - }) - project - with - | :? Fake.DotNet.MSBuildException -> - printfn "Not all integration tests passed the first time" - if failOnError then reraise() - - - logsPath - - let runStandardTests testToRun = + let runStandardTestsWithOptions testToRun (failOnError: bool) = + Directory.ensure testResultsDir + Trace.log " --- Testing net core version --- " + + let project = + Path.combine currentDir "src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj" + + match testToRun with + | Method testMethodName -> + let logsPath = + findNextTrxTestPath (Path.combine testResultsDir "tests-netstandard.trx") + + DotNet.test + (fun opts -> + { opts with + Configuration = configuration + Filter = Some testMethodName + Logger = Some("trx;logfilename=" + logsPath) }) + project + + logsPath + | UnitTests -> + let logsPath = Path.combine testResultsDir "tests-netstandard-unit.trx" + let mutable filters = [ "type!=integration" ] + + if Environment.isLinux then + filters <- filters @ [ "linux!=skip" ] + + try + DotNet.test + (fun opts -> + { opts with + Configuration = configuration + Filter = Some(filters |> String.concat "&") + Logger = Some("trx;logfilename=" + logsPath) }) + project + with :? Fake.DotNet.MSBuildException -> + printfn "Not all unit tests passed. FailOnError is %b" failOnError |> ignore + + if failOnError then + reraise () + + logsPath + | IntegrationTests -> + let logsPath = Path.combine testResultsDir "tests-netstandard-integration.trx" + + try + DotNet.test + (fun opts -> + { opts with + Configuration = configuration + Filter = Some("type=integration") + Logger = Some("trx;logfilename=" + logsPath) }) + project + with :? Fake.DotNet.MSBuildException -> + printfn "Not all integration tests passed the first time" + + if failOnError then + reraise () + + + logsPath + + let runStandardTests testToRun = runStandardTestsWithOptions testToRun true - let runStandardTestsAllowRetry testToRun = + let runStandardTestsAllowRetry testToRun = runStandardTestsWithOptions testToRun false - let runFrameworkTests testToRun errorLevel = - Directory.ensure testResultsDir - let testDir = Path.combine currentDir "src/IO.Ably.Tests.NETFramework/bin/Release" - let testDll = !! (Path.combine testDir "*.Tests.*.dll") - - match testToRun with - | Method testMethodName -> - let logsPath = findNextTestPath(Path.combine testResultsDir "xunit-netframework.xml") - testDll - |> xUnit2 (fun p -> { p with NUnitXmlOutputPath = Some ( logsPath) - Method = Some (trimTestMethod testMethodName) - ErrorLevel = errorLevel - }) - logsPath - | UnitTests -> - let logsPath = Path.combine testResultsDir "xunit-netframework-unit.xml" - testDll - |> xUnit2 (fun p -> { p with NUnitXmlOutputPath = Some logsPath - ExcludeTraits = [ ("type", "integration")] - ErrorLevel = errorLevel - }) - logsPath - | IntegrationTests -> - let logsPath = Path.combine testResultsDir "xunit-netframework-integration.xml" - testDll - |> xUnit2 (fun p -> { p with NUnitXmlOutputPath = Some logsPath - IncludeTraits = [ ("type", "integration")] - TimeOut = TimeSpan.FromMinutes(20.) - Parallel = ParallelMode.Collections - ErrorLevel = errorLevel - }) - logsPath - - Target.create "NetFramework.Integration.Rerun" (fun _ -> - - let setParams (defaults:MSBuildParams) = - { defaults with - Verbosity = Some(Quiet) - Targets = ["Build"] - Properties = - [ - "Optimize", "True" - "DebugSymbols", "True" - "Configuration", buildMode - "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 - ] - } + let runFrameworkTests testToRun errorLevel = + Directory.ensure testResultsDir + let testDir = Path.combine currentDir "src/IO.Ably.Tests.NETFramework/bin/Release" + let testDll = !!(Path.combine testDir "*.Tests.*.dll") + + match testToRun with + | Method testMethodName -> + let logsPath = + findNextTestPath (Path.combine testResultsDir "xunit-netframework.xml") + + testDll + |> xUnit2 (fun p -> + { p with + NUnitXmlOutputPath = Some(logsPath) + Method = Some(trimTestMethod testMethodName) + ErrorLevel = errorLevel }) + + logsPath + | UnitTests -> + let logsPath = Path.combine testResultsDir "xunit-netframework-unit.xml" + + testDll + |> xUnit2 (fun p -> + { p with + NUnitXmlOutputPath = Some logsPath + ExcludeTraits = [ ("type", "integration") ] + ErrorLevel = errorLevel }) + + logsPath + | IntegrationTests -> + let logsPath = Path.combine testResultsDir "xunit-netframework-integration.xml" + + testDll + |> xUnit2 (fun p -> + { p with + NUnitXmlOutputPath = Some logsPath + IncludeTraits = [ ("type", "integration") ] + TimeOut = TimeSpan.FromMinutes(20.) + Parallel = ParallelMode.Collections + ErrorLevel = errorLevel }) + + logsPath + + Target.create "NetFramework.Integration.Rerun" (fun _ -> + + let setParams (defaults: MSBuildParams) = + { defaults with + Verbosity = Some(Quiet) + Targets = [ "Build" ] + Properties = + [ "Optimize", "True" + "DebugSymbols", "True" + "Configuration", buildMode + "dummy", "property" ] } // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 + MSBuild.build setParams NetFrameworkSolution let logsPath = Path.combine testResultsDir "xunit-netframework-integration.xml" - + let failedTestNames = findFailedXUnitTests logsPath for test in failedTestNames do - runFrameworkTests (Method test) TestRunnerErrorLevel.Error |> ignore - ) + runFrameworkTests (Method test) TestRunnerErrorLevel.Error |> ignore) Target.create "NetFramework - Unit Tests" (fun _ -> - - runFrameworkTests UnitTests TestRunnerErrorLevel.Error |> ignore - ) - Target.create "NetFramework - Integration Tests" ( fun _ -> + runFrameworkTests UnitTests TestRunnerErrorLevel.Error |> ignore) + + Target.create "NetFramework - Integration Tests" (fun _ -> let logs = runFrameworkTests IntegrationTests TestRunnerErrorLevel.DontFailBuild let failedTestNames = findFailedXUnitTests logs for test in failedTestNames do - runFrameworkTests (Method test) TestRunnerErrorLevel.Error |> ignore - ) + runFrameworkTests (Method test) TestRunnerErrorLevel.Error |> ignore) Target.create "NetStandard - Build" (fun _ -> - DotNet.build (fun opts -> { - opts with Configuration = configuration - }) NetStandardSolution - ) + DotNet.build (fun opts -> { opts with Configuration = configuration }) NetStandardSolution) - Target.create "NetStandard - Unit Tests" (fun _ -> - runStandardTests UnitTests |> ignore - ) + Target.create "NetStandard - Unit Tests" (fun _ -> runStandardTests UnitTests |> ignore) Target.create "NetStandard - Unit Tests with retry" (fun _ -> - let logs = runStandardTestsAllowRetry UnitTests + let logs = runStandardTestsAllowRetry UnitTests let failedTestNames = findFailedDotnetTestTests logs for test in failedTestNames do - runStandardTests (Method test) |> ignore - ) + runStandardTests (Method test) |> ignore) Target.create "NetStandard - Integration Tests" (fun _ -> @@ -356,8 +360,7 @@ let initTargets (argv) = let failedTestNames = findFailedDotnetTestTests logs for test in failedTestNames do - runStandardTests (Method test) |> ignore - ) + runStandardTests (Method test) |> ignore) // This is duplicated before of Fake's build dependency doesn't allow // This this target to be run independent of the unit tests @@ -368,97 +371,87 @@ let initTargets (argv) = let failedTestNames = findFailedDotnetTestTests logs for test in failedTestNames do - runStandardTests (Method test) |> ignore - ) + runStandardTests (Method test) |> ignore) - Target.create "Package - Build All" (fun _ -> - let setParams (defaults:MSBuildParams) = + Target.create "Package - Build All" (fun _ -> + let setParams (defaults: MSBuildParams) = { defaults with Verbosity = Some(Quiet) - Targets = ["Build"] + Targets = [ "Build" ] Properties = - [ - "Optimize", "True" - "DebugSymbols", "True" - "Configuration", buildMode - "StyleCopEnabled", "True" - "Package", "True" - "DefineConstants", "PACKAGE" - "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 - ] - } - MSBuild.build setParams packageSolution - ) - - Target.create "Push Package - Build All" (fun _ -> - let setParams (defaults:MSBuildParams) = + [ "Optimize", "True" + "DebugSymbols", "True" + "Configuration", buildMode + "StyleCopEnabled", "True" + "Package", "True" + "DefineConstants", "PACKAGE" + "dummy", "property" ] } // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 + + MSBuild.build setParams packageSolution) + + Target.create "Push Package - Build All" (fun _ -> + let setParams (defaults: MSBuildParams) = { defaults with Verbosity = Some(Quiet) - Targets = ["Build"] + Targets = [ "Build" ] Properties = - [ - "Optimize", "True" - "DebugSymbols", "True" - "Configuration", "Package" - "StyleCopEnabled", "True" - "Package", "True" - "DefineConstants", "PACKAGE" - "dummy", "property" // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 - ] - } - MSBuild.build setParams pushPackageSolution - ) + [ "Optimize", "True" + "DebugSymbols", "True" + "Configuration", "Package" + "StyleCopEnabled", "True" + "Package", "True" + "DefineConstants", "PACKAGE" + "dummy", "property" ] } // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 - Target.create "Package - Merge json.net" (fun _ -> - let projectsToMerge = [ "IO.Ably.Android"; "IO.Ably.iOS"; "IO.Ably.NETFramework" ] - let binFolderPaths = projectsToMerge - |> Seq.map (Path.combine "src") - |> Seq.map (fun path -> sprintf "%s/bin/%s" path buildMode) + MSBuild.build setParams pushPackageSolution) - // Copy all IO.Ably* files to the `packaged folder` - binFolderPaths - |> Seq.iter ( fun path -> !! (Path.combine path "IO.Ably*") |> Shell.copy (Path.combine path "packaged")) - - // Merge newtonsoft json into ably.dll and overwrite IO.Ably.dll in the packaged folder with the merged one - binFolderPaths - |> Seq.iter ( fun path -> mergeJsonNet path (Path.combine path "packaged")) + Target.create "Package - Merge json.net" (fun _ -> + let projectsToMerge = [ "IO.Ably.Android"; "IO.Ably.iOS"; "IO.Ably.NETFramework" ] - ) + let binFolderPaths = + projectsToMerge + |> Seq.map (Path.combine "src") + |> Seq.map (fun path -> sprintf "%s/bin/%s" path buildMode) - Target.create "Package - Create nuget" (fun _ -> - CreateProcess.fromRawCommand "./tools/nuget.exe" - [ - "pack" - "./nuget/io.ably.nuspec" - "-properties" - sprintf "version=%s;configuration=Release" version - ] - |> Proc.run // start with the above configuration - |> ignore - ) + // Copy all IO.Ably* files to the `packaged folder` + binFolderPaths + |> Seq.iter (fun path -> !!(Path.combine path "IO.Ably*") |> Shell.copy (Path.combine path "packaged")) + + // Merge newtonsoft json into ably.dll and overwrite IO.Ably.dll in the packaged folder with the merged one + binFolderPaths + |> Seq.iter (fun path -> mergeJsonNet path (Path.combine path "packaged")) - Target.create "Package - Push" (fun _ -> - CreateProcess.fromRawCommand "nuget" - [ - "pack" - "./nuget/io.ably.push.android.nuspec" - "-properties" - sprintf "version=%s;configuration=Release" version - ] - |> Proc.run // start with the above configuration - |> ignore - - CreateProcess.fromRawCommand "nuget" - [ - "pack" - "./nuget/io.ably.push.ios.nuspec" - "-properties" - sprintf "version=%s;configuration=Release" version - ] - |> Proc.run // start with the above configuration - |> ignore ) + Target.create "Package - Create nuget" (fun _ -> + CreateProcess.fromRawCommand + "./tools/nuget.exe" + [ "pack" + "./nuget/io.ably.nuspec" + "-properties" + sprintf "version=%s;configuration=Release" version ] + |> Proc.run // start with the above configuration + |> ignore) + + Target.create "Package - Push" (fun _ -> + CreateProcess.fromRawCommand + "nuget" + [ "pack" + "./nuget/io.ably.push.android.nuspec" + "-properties" + sprintf "version=%s;configuration=Release" version ] + |> Proc.run // start with the above configuration + |> ignore + + CreateProcess.fromRawCommand + "nuget" + [ "pack" + "./nuget/io.ably.push.ios.nuspec" + "-properties" + sprintf "version=%s;configuration=Release" version ] + |> Proc.run // start with the above configuration + |> ignore) + Target.create "Prepare" ignore Target.create "Build.NetFramework" ignore Target.create "Build.NetStandard" ignore @@ -477,55 +470,44 @@ let initTargets (argv) = - "Clean" - ==> "Restore" - ==> "Prepare" + "Clean" ==> "Restore" ==> "Prepare" - "Prepare" - ==> "NetFramework - Build" - ==> "Build.NetFramework" + "Prepare" ==> "NetFramework - Build" ==> "Build.NetFramework" - "Prepare" - ==> "Restore Xamarin" - ==> "Xamarin - Build" - ==> "Build.Xamarin" + "Prepare" ==> "Restore Xamarin" ==> "Xamarin - Build" ==> "Build.Xamarin" - "Prepare" - ==> "NetStandard - Build" - ==> "Build.NetStandard" + "Prepare" ==> "NetStandard - Build" ==> "Build.NetStandard" "Prepare" - ==> "Version" - ==> "Package - Build All" - ==> "Package - Merge json.net" - ==> "Package - Create nuget" - ==> "Package" + ==> "Version" + ==> "Package - Build All" + ==> "Package - Merge json.net" + ==> "Package - Create nuget" + ==> "Package" "Prepare" - ==> "Version" - ==> "Push Package - Build All" - ==> "Package - Push" - ==> "PushPackage" + ==> "Version" + ==> "Push Package - Build All" + ==> "Package - Push" + ==> "PushPackage" - "Build.NetFramework" - ==> "NetFramework - Unit Tests" - ==> "Test.NetFramework.Unit" + "Build.NetFramework" + ==> "NetFramework - Unit Tests" + ==> "Test.NetFramework.Unit" - "Build.NetFramework" - ==> "NetFramework - Integration Tests" - ==> "Test.NetFramework.Integration" + "Build.NetFramework" + ==> "NetFramework - Integration Tests" + ==> "Test.NetFramework.Integration" - "Build.NetStandard" - ==> "NetStandard - Unit Tests" - ==> "Test.NetStandard.Unit" + "Build.NetStandard" ==> "NetStandard - Unit Tests" ==> "Test.NetStandard.Unit" "Build.NetStandard" - ==> "NetStandard - Integration Tests" - ==> "Test.NetStandard.Integration" + ==> "NetStandard - Integration Tests" + ==> "Test.NetStandard.Integration" "Build.NetStandard" - ==> "NetStandard - Unit Tests with retry" - ==> "Test.NetStandard.Unit.WithRetry" + ==> "NetStandard - Unit Tests with retry" + ==> "Test.NetStandard.Unit.WithRetry" //----------------------------------------------------------------------------- // Target Start @@ -537,7 +519,8 @@ let main argv = |> Array.toList |> Context.FakeExecutionContext.Create false "build-script.fsx" |> Context.RuntimeContext.Fake - |> Context.setExecutionContext + |> Context.setExecutionContext + initTargets (argv) Target.runOrDefaultWithArguments "Build.NetFramework" From 84503365a4bfd66afb60f3fbcc031329714d59af Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 15 Apr 2023 20:42:23 +0530 Subject: [PATCH 47/72] Fixed tests for agent headers --- .../Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs | 4 +--- src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs index 572b5553a..e87a28f1b 100644 --- a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs @@ -131,9 +131,7 @@ public async Task ShouldSetTransportAblyAgentHeader() { "ably-dotnet/", Defaults.DotnetRuntimeIdentifier(), - Defaults.OsIdentifier(), - "agent1", - "agent2", + Defaults.OsIdentifier() }; keys.RemoveAll(s => s == string.Empty); diff --git a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs index 51a588803..33eb2be2c 100644 --- a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs @@ -99,9 +99,7 @@ public async Task WhenCallingUrl_AddsDefaultAblyAgentHeader() { "ably-dotnet/", Defaults.DotnetRuntimeIdentifier(), - Defaults.OsIdentifier(), - "agent1", - "agent2", + Defaults.OsIdentifier() }; keys.RemoveAll(s => s == string.Empty); From 30c3154d7abdbd949d720e80ae569d8d02d05a79 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 00:31:12 +0530 Subject: [PATCH 48/72] Added option to choose the target framework to run the test --- build-script/build.fs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build-script/build.fs b/build-script/build.fs index 121575ed8..4afef6703 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -44,6 +44,7 @@ Usage: Options: -t Target -v Version + -f Target Framework Moniker (TFM) """ let initTargets (argv) = @@ -63,6 +64,11 @@ let initTargets (argv) = | None -> "" | Some version -> version + let framework: string option = + match DocoptResult.tryGetArgument "-f" parsedArguments with + | None -> None + | Some framework -> Some framework + let mergeJsonNet path outputPath = let target = Path.combine path "IO.Ably.dll" let docsFile = Path.combine path "IO.Ably.xml" @@ -210,6 +216,7 @@ let initTargets (argv) = { opts with Configuration = configuration Filter = Some testMethodName + Framework = framework Logger = Some("trx;logfilename=" + logsPath) }) project @@ -227,6 +234,7 @@ let initTargets (argv) = { opts with Configuration = configuration Filter = Some(filters |> String.concat "&") + Framework = framework Logger = Some("trx;logfilename=" + logsPath) }) project with :? Fake.DotNet.MSBuildException -> From 349dfb62bf4e299a70ae960f3379f72c27722f6f Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 00:46:03 +0530 Subject: [PATCH 49/72] Updated github workflow, added targets for net6.0 and net7.0 --- .github/workflows/integration-test-linux.yml | 9 ++++++--- .github/workflows/integration-test-macos.yml | 8 ++++++-- .github/workflows/integration-test-windows.yml | 1 - 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration-test-linux.yml b/.github/workflows/integration-test-linux.yml index c501dc659..d27ba4eac 100644 --- a/.github/workflows/integration-test-linux.yml +++ b/.github/workflows/integration-test-linux.yml @@ -11,6 +11,10 @@ jobs: env: DOTNET_NOLOGO: true + strategy: + matrix: + targetframework: [ "net6.0", "net7.0" ] + steps: - uses: actions/checkout@v2 with: @@ -19,12 +23,11 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | - 3.1.x 6.0.x 7.0.x - name: Download fake-cli run: dotnet tool restore - name: Unit tests - run: ./build.sh Test.NetStandard.Unit.WithRetry + run: ./build.sh Test.NetStandard.Unit.WithRetry -f ${{ matrix.targetframework }} - name: Integration tests - run: ./build.sh Test.NetStandard.Integration + run: ./build.sh Test.NetStandard.Integration -f ${{ matrix.targetframework }} diff --git a/.github/workflows/integration-test-macos.yml b/.github/workflows/integration-test-macos.yml index a5062ccbb..eabd4c264 100644 --- a/.github/workflows/integration-test-macos.yml +++ b/.github/workflows/integration-test-macos.yml @@ -11,6 +11,10 @@ jobs: env: DOTNET_NOLOGO: true + strategy: + matrix: + targetframework: [ "net6.0", "net7.0" ] + steps: - uses: actions/checkout@v2 with: @@ -32,6 +36,6 @@ jobs: - name: Build Xamarin projects run: ./build.sh Build.Xamarin - name: Unit tests - run: ./build.sh Test.NetStandard.Unit.WithRetry + run: ./build.sh Test.NetStandard.Unit.WithRetry -f ${{ matrix.targetframework }} - name: Integration tests - run: ./build.sh Test.NetStandard.Integration + run: ./build.sh Test.NetStandard.Integration -f ${{ matrix.targetframework }} diff --git a/.github/workflows/integration-test-windows.yml b/.github/workflows/integration-test-windows.yml index bf517090d..8e406a2ec 100644 --- a/.github/workflows/integration-test-windows.yml +++ b/.github/workflows/integration-test-windows.yml @@ -23,7 +23,6 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | - 3.1.x 6.0.x 7.0.x - name: Download fake-cli From eea8e790a1d939c4386fdd544c80f223c39d3239 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 01:12:57 +0530 Subject: [PATCH 50/72] Refactored github workflow, added net6.0 and net6.0 targets for all platforms --- .github/workflows/build-xamarin-macos.yml | 35 +++++++++++++++++++ ...ion-test-linux.yml => run-tests-linux.yml} | 8 +++-- ...ion-test-macos.yml => run-tests-macos.yml} | 16 ++++----- .../run-tests-windows-netframework.yml | 26 ++++++++++++++ ...test-windows.yml => run-tests-windows.yml} | 14 +++++--- 5 files changed, 82 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/build-xamarin-macos.yml rename .github/workflows/{integration-test-linux.yml => run-tests-linux.yml} (88%) rename .github/workflows/{integration-test-macos.yml => run-tests-macos.yml} (68%) create mode 100644 .github/workflows/run-tests-windows-netframework.yml rename .github/workflows/{integration-test-windows.yml => run-tests-windows.yml} (61%) diff --git a/.github/workflows/build-xamarin-macos.yml b/.github/workflows/build-xamarin-macos.yml new file mode 100644 index 000000000..9b2093716 --- /dev/null +++ b/.github/workflows/build-xamarin-macos.yml @@ -0,0 +1,35 @@ +name: "Xamarin Build: macOS" +on: + pull_request: + push: + branches: + - main + +jobs: + check: + runs-on: macos-latest + env: + DOTNET_NOLOGO: true + + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Download dotnet framework + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 3.1.x + + - name: Download dotnet build-script tools + run: dotnet tool restore + + - name: Install mono and restore packages + run: | + chmod +x ./tools/mono-install.sh + ./tools/mono-install.sh + nuget restore ./src/IO.Ably.Xamarin.sln + + - name: Build Xamarin projects + run: ./build.sh Build.Xamarin diff --git a/.github/workflows/integration-test-linux.yml b/.github/workflows/run-tests-linux.yml similarity index 88% rename from .github/workflows/integration-test-linux.yml rename to .github/workflows/run-tests-linux.yml index d27ba4eac..690d3593e 100644 --- a/.github/workflows/integration-test-linux.yml +++ b/.github/workflows/run-tests-linux.yml @@ -1,4 +1,4 @@ -name: "Integration Test: Linux" +name: "Unit and Integration Test: Linux" on: pull_request: push: @@ -19,15 +19,19 @@ jobs: - uses: actions/checkout@v2 with: submodules: 'recursive' + - name: Download dotnet framework uses: actions/setup-dotnet@v3 with: dotnet-version: | 6.0.x 7.0.x - - name: Download fake-cli + + - name: Download dotnet build-script tools run: dotnet tool restore + - name: Unit tests run: ./build.sh Test.NetStandard.Unit.WithRetry -f ${{ matrix.targetframework }} + - name: Integration tests run: ./build.sh Test.NetStandard.Integration -f ${{ matrix.targetframework }} diff --git a/.github/workflows/integration-test-macos.yml b/.github/workflows/run-tests-macos.yml similarity index 68% rename from .github/workflows/integration-test-macos.yml rename to .github/workflows/run-tests-macos.yml index eabd4c264..d33257cf0 100644 --- a/.github/workflows/integration-test-macos.yml +++ b/.github/workflows/run-tests-macos.yml @@ -1,4 +1,4 @@ -name: "Integration Test: macOS" +name: "Unit and Integration Test: macOS" on: pull_request: push: @@ -19,23 +19,19 @@ jobs: - uses: actions/checkout@v2 with: submodules: 'recursive' + - name: Download dotnet framework uses: actions/setup-dotnet@v3 with: dotnet-version: | - 3.1.x 6.0.x 7.0.x - - name: Download fake-cli + + - name: Download dotnet build-script tools run: dotnet tool restore - - name: Restore packages - run: | - chmod +x ./tools/mono-install.sh - ./tools/mono-install.sh - nuget restore ./src/IO.Ably.Xamarin.sln - - name: Build Xamarin projects - run: ./build.sh Build.Xamarin + - name: Unit tests run: ./build.sh Test.NetStandard.Unit.WithRetry -f ${{ matrix.targetframework }} + - name: Integration tests run: ./build.sh Test.NetStandard.Integration -f ${{ matrix.targetframework }} diff --git a/.github/workflows/run-tests-windows-netframework.yml b/.github/workflows/run-tests-windows-netframework.yml new file mode 100644 index 000000000..a9d972bf3 --- /dev/null +++ b/.github/workflows/run-tests-windows-netframework.yml @@ -0,0 +1,26 @@ +name: "Unit and Integration Test: Windows (NetFramework)" +on: + pull_request: + push: + branches: + - main + +jobs: + check: + runs-on: windows-latest + env: + DOTNET_NOLOGO: true + + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Download dotnet build-script tools + run: dotnet tool restore + + - name: Unit tests + run: ./build.cmd Test.NetFramework.Unit + + - name: Integration tests + run: ./build.cmd Test.NetFramework.Integration diff --git a/.github/workflows/integration-test-windows.yml b/.github/workflows/run-tests-windows.yml similarity index 61% rename from .github/workflows/integration-test-windows.yml rename to .github/workflows/run-tests-windows.yml index 8e406a2ec..5eee2414a 100644 --- a/.github/workflows/integration-test-windows.yml +++ b/.github/workflows/run-tests-windows.yml @@ -1,4 +1,4 @@ -name: "Integration Test: Windows" +name: "Unit and Integration Test: Windows" on: pull_request: push: @@ -13,21 +13,25 @@ jobs: strategy: matrix: - target: [ "Test.NetStandard", "Test.NetFramework" ] + targetframework: [ "net6.0", "net7.0" ] steps: - uses: actions/checkout@v2 with: submodules: 'recursive' + - name: Download framework uses: actions/setup-dotnet@v3 with: dotnet-version: | 6.0.x 7.0.x - - name: Download fake-cli + + - name: Download dotnet build-script tools run: dotnet tool restore + - name: Unit tests - run: ./build.cmd ${{ matrix.target }}.Unit + run: ./build.cmd Test.NetStandard.Unit -f ${{ matrix.targetframework }} + - name: Integration tests - run: ./build.cmd ${{ matrix.target }}.Integration + run: ./build.cmd Test.NetStandard.Integration -f ${{ matrix.targetframework }} From f952f493555a1d03bd5682070706369eb62c9972 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 01:38:36 +0530 Subject: [PATCH 51/72] Refactored step to run integration tests with retry in build script file --- build-script/build.fs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/build-script/build.fs b/build-script/build.fs index 4afef6703..ef20615ae 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -361,17 +361,8 @@ let initTargets (argv) = for test in failedTestNames do runStandardTests (Method test) |> ignore) - Target.create "NetStandard - Integration Tests" (fun _ -> + Target.create "NetStandard - Integration Tests" (fun _ -> runStandardTests IntegrationTests |> ignore) - let logs = runStandardTestsAllowRetry IntegrationTests - - let failedTestNames = findFailedDotnetTestTests logs - - for test in failedTestNames do - runStandardTests (Method test) |> ignore) - - // This is duplicated before of Fake's build dependency doesn't allow - // This this target to be run independent of the unit tests Target.create "NetStandard - Integration Tests with retry" (fun _ -> let logs = runStandardTestsAllowRetry IntegrationTests @@ -509,13 +500,17 @@ let initTargets (argv) = "Build.NetStandard" ==> "NetStandard - Unit Tests" ==> "Test.NetStandard.Unit" + "Build.NetStandard" + ==> "NetStandard - Unit Tests with retry" + ==> "Test.NetStandard.Unit.WithRetry" + "Build.NetStandard" ==> "NetStandard - Integration Tests" ==> "Test.NetStandard.Integration" "Build.NetStandard" - ==> "NetStandard - Unit Tests with retry" - ==> "Test.NetStandard.Unit.WithRetry" + ==> "NetStandard - Integration Tests with retry" + ==> "Test.NetStandard.Integration.WithRetry" //----------------------------------------------------------------------------- // Target Start From 277bd9efe0a011f84dc5f674b308522fbdd9eab6 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 01:39:03 +0530 Subject: [PATCH 52/72] Updated github workflows to run tests with retry --- .github/workflows/build-xamarin-macos.yml | 3 ++- .github/workflows/run-tests-linux.yml | 2 +- .github/workflows/run-tests-macos.yml | 2 +- .github/workflows/run-tests-windows.yml | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-xamarin-macos.yml b/.github/workflows/build-xamarin-macos.yml index 9b2093716..43ced1683 100644 --- a/.github/workflows/build-xamarin-macos.yml +++ b/.github/workflows/build-xamarin-macos.yml @@ -24,7 +24,8 @@ jobs: - name: Download dotnet build-script tools run: dotnet tool restore - + + #TODO - Need to refactor this step to restore packages using nuget restore, instead restore while building xamarin project - name: Install mono and restore packages run: | chmod +x ./tools/mono-install.sh diff --git a/.github/workflows/run-tests-linux.yml b/.github/workflows/run-tests-linux.yml index 690d3593e..2c26b9003 100644 --- a/.github/workflows/run-tests-linux.yml +++ b/.github/workflows/run-tests-linux.yml @@ -34,4 +34,4 @@ jobs: run: ./build.sh Test.NetStandard.Unit.WithRetry -f ${{ matrix.targetframework }} - name: Integration tests - run: ./build.sh Test.NetStandard.Integration -f ${{ matrix.targetframework }} + run: ./build.sh Test.NetStandard.Integration.WithRetry -f ${{ matrix.targetframework }} diff --git a/.github/workflows/run-tests-macos.yml b/.github/workflows/run-tests-macos.yml index d33257cf0..2c9ac1edd 100644 --- a/.github/workflows/run-tests-macos.yml +++ b/.github/workflows/run-tests-macos.yml @@ -34,4 +34,4 @@ jobs: run: ./build.sh Test.NetStandard.Unit.WithRetry -f ${{ matrix.targetframework }} - name: Integration tests - run: ./build.sh Test.NetStandard.Integration -f ${{ matrix.targetframework }} + run: ./build.sh Test.NetStandard.Integration.WithRetry -f ${{ matrix.targetframework }} diff --git a/.github/workflows/run-tests-windows.yml b/.github/workflows/run-tests-windows.yml index 5eee2414a..d40cf1501 100644 --- a/.github/workflows/run-tests-windows.yml +++ b/.github/workflows/run-tests-windows.yml @@ -31,7 +31,7 @@ jobs: run: dotnet tool restore - name: Unit tests - run: ./build.cmd Test.NetStandard.Unit -f ${{ matrix.targetframework }} + run: ./build.cmd Test.NetStandard.Unit.WithRetry -f ${{ matrix.targetframework }} - name: Integration tests - run: ./build.cmd Test.NetStandard.Integration -f ${{ matrix.targetframework }} + run: ./build.cmd Test.NetStandard.Integration.WithRetry -f ${{ matrix.targetframework }} From b48763af250aea26ef9511ba51759edd425117bb Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 01:46:57 +0530 Subject: [PATCH 53/72] Updated build.fs, added targets for netframework test retry --- build-script/build.fs | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/build-script/build.fs b/build-script/build.fs index ef20615ae..f9306d57f 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -339,8 +339,21 @@ let initTargets (argv) = runFrameworkTests UnitTests TestRunnerErrorLevel.Error |> ignore) + Target.create "NetFramework - Unit Tests with retry" (fun _ -> + + let logs = runFrameworkTests UnitTests TestRunnerErrorLevel.DontFailBuild + + let failedTestNames = findFailedXUnitTests logs + + for test in failedTestNames do + runFrameworkTests (Method test) TestRunnerErrorLevel.Error |> ignore) + Target.create "NetFramework - Integration Tests" (fun _ -> + runFrameworkTests IntegrationTests TestRunnerErrorLevel.Error |> ignore) + + Target.create "NetFramework - Integration Tests with retry" (fun _ -> + let logs = runFrameworkTests IntegrationTests TestRunnerErrorLevel.DontFailBuild let failedTestNames = findFailedXUnitTests logs @@ -457,12 +470,14 @@ let initTargets (argv) = Target.create "Build.Xamarin" ignore Target.create "Test.NetFramework.Unit" ignore + Target.create "Test.NetFramework.Unit.WithRetry" ignore Target.create "Test.NetFramework.Integration" ignore + Target.create "Test.NetFramework.Integration.WithRetry" ignore Target.create "Test.NetStandard.Unit" ignore Target.create "Test.NetStandard.Unit.WithRetry" ignore - Target.create "Test.NetStandard.Integration.WithRetry" ignore Target.create "Test.NetStandard.Integration" ignore + Target.create "Test.NetStandard.Integration.WithRetry" ignore Target.create "Package" ignore Target.create "PushPackage" ignore @@ -494,10 +509,19 @@ let initTargets (argv) = ==> "NetFramework - Unit Tests" ==> "Test.NetFramework.Unit" + "Build.NetFramework" + ==> "NetFramework - Unit Tests with retry" + ==> "Test.NetFramework.Unit.WithRetry" + "Build.NetFramework" ==> "NetFramework - Integration Tests" ==> "Test.NetFramework.Integration" + "Build.NetFramework" + ==> "NetFramework - Integration Tests with retry" + ==> "Test.NetFramework.Integration.WithRetry" + + "Build.NetStandard" ==> "NetStandard - Unit Tests" ==> "Test.NetStandard.Unit" "Build.NetStandard" From c9cb2f67e5656e3d8d0c6c0cc2406bf8ccca3bf3 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 01:47:23 +0530 Subject: [PATCH 54/72] Updated windows netframework workflow to run tests with retry --- .github/workflows/run-tests-windows-netframework.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests-windows-netframework.yml b/.github/workflows/run-tests-windows-netframework.yml index a9d972bf3..f2ce7acba 100644 --- a/.github/workflows/run-tests-windows-netframework.yml +++ b/.github/workflows/run-tests-windows-netframework.yml @@ -20,7 +20,7 @@ jobs: run: dotnet tool restore - name: Unit tests - run: ./build.cmd Test.NetFramework.Unit + run: ./build.cmd Test.NetFramework.Unit.WithRetry - name: Integration tests - run: ./build.cmd Test.NetFramework.Integration + run: ./build.cmd Test.NetFramework.Integration.WithRetry From 2825f063ea8b3e0bd628f373408d986271397600 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 01:47:49 +0530 Subject: [PATCH 55/72] Added README to build script folder --- build-script/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 build-script/README.md diff --git a/build-script/README.md b/build-script/README.md new file mode 100644 index 000000000..49b0ab55b --- /dev/null +++ b/build-script/README.md @@ -0,0 +1,12 @@ +### Fake Scripts for building and testing ably-dotnet SDK + +- Download fake tools by running following command at root +``` +dotnet tool restore +``` + +- Format `build.fs` using + +``` +dotnet fantomas .\build-script\build.fs +``` From e962640ab3d3fcd4d251dca31a778b99891cf677 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 01:57:10 +0530 Subject: [PATCH 56/72] Updated build script to fix xamarin project restore --- build-script/build.fs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/build-script/build.fs b/build-script/build.fs index f9306d57f..b802f0053 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -126,18 +126,6 @@ let initTargets (argv) = |> Proc.run |> ignore) - Target.create "Restore Xamarin" (fun _ -> - if not Environment.isWindows then - CreateProcess.fromRawCommand "ls" [ "../packages" ] |> Proc.run |> ignore - - let setParams (defaults: MSBuildParams) = - { defaults with - Verbosity = Some(Quiet) - Targets = [ "Restore" ] - Properties = [ "Configuration", buildMode; "RestorePackages", "True"; "dummy", "property" ] } // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 - - MSBuild.build setParams XamarinSolution) - Target.create "NetFramework - Build" (fun _ -> let setParams (defaults: MSBuildParams) = { defaults with @@ -151,6 +139,18 @@ let initTargets (argv) = MSBuild.build setParams NetFrameworkSolution) + + Target.create "Restore Xamarin" (fun _ -> + + let setParams (defaults: MSBuildParams) = + { defaults with + Verbosity = Some(Quiet) + Targets = [ "Restore" ] + Properties = [ "Configuration", buildMode; "RestorePackages", "True"; "dummy", "property" ] } // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 + + MSBuild.build setParams XamarinSolution) + + Target.create "Xamarin - Build" (fun _ -> let setParams (defaults: MSBuildParams) = { defaults with From 597505bac06e462b742abdcb66157925df892bec Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 01:57:40 +0530 Subject: [PATCH 57/72] Updated macos xamarin build workflow, removed unnecessary nuget restore --- .github/workflows/build-xamarin-macos.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-xamarin-macos.yml b/.github/workflows/build-xamarin-macos.yml index 43ced1683..aa550a8e4 100644 --- a/.github/workflows/build-xamarin-macos.yml +++ b/.github/workflows/build-xamarin-macos.yml @@ -25,12 +25,10 @@ jobs: - name: Download dotnet build-script tools run: dotnet tool restore - #TODO - Need to refactor this step to restore packages using nuget restore, instead restore while building xamarin project - - name: Install mono and restore packages + - name: Install mono run: | chmod +x ./tools/mono-install.sh ./tools/mono-install.sh - nuget restore ./src/IO.Ably.Xamarin.sln - name: Build Xamarin projects run: ./build.sh Build.Xamarin From 612d3596b936fdad04b773b2b3fe111c060c00ae Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 02:19:04 +0530 Subject: [PATCH 58/72] Updated xamarin restore step from nuget CLI --- build-script/build.fs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/build-script/build.fs b/build-script/build.fs index b802f0053..f706367fe 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -114,13 +114,16 @@ let initTargets (argv) = AssemblyInfo.FileVersion version ]) - let nugetRestore solutionFile = + let nugetRestoreUsingLocalTool solutionFile = CreateProcess.fromRawCommand "./tools/nuget.exe" [ "restore"; solutionFile ] - |> Proc.run // start with the above configuration + |> Proc.run + + let nugetRestoreUsingCLI solutionFile = + CreateProcess.fromRawCommand "nuget" [ "restore"; solutionFile ] |> Proc.run Target.create "Restore" (fun _ -> if Environment.isWindows then - nugetRestore "src/IO.Ably.sln" |> ignore + nugetRestoreUsingLocalTool "src/IO.Ably.sln" |> ignore CreateProcess.fromRawCommand "dotnet" [ "restore"; "src/IO.Ably.sln" ] |> Proc.run @@ -140,16 +143,7 @@ let initTargets (argv) = MSBuild.build setParams NetFrameworkSolution) - Target.create "Restore Xamarin" (fun _ -> - - let setParams (defaults: MSBuildParams) = - { defaults with - Verbosity = Some(Quiet) - Targets = [ "Restore" ] - Properties = [ "Configuration", buildMode; "RestorePackages", "True"; "dummy", "property" ] } // workaround added as per https://github.com/fsprojects/FAKE/issues/2738 - - MSBuild.build setParams XamarinSolution) - + Target.create "Restore Xamarin" (fun _ -> nugetRestoreUsingCLI XamarinSolution |> ignore) Target.create "Xamarin - Build" (fun _ -> let setParams (defaults: MSBuildParams) = From eff73bd71c6bd7592285c1a1009ee1a286bb70cd Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 13:50:00 +0530 Subject: [PATCH 59/72] Refactored agent header implementation, moved to a separate file --- src/IO.Ably.Android/Platform.cs | 2 +- src/IO.Ably.NETFramework/Platform.cs | 2 +- src/IO.Ably.NETStandard20/Platform.cs | 6 +- src/IO.Ably.Shared/Agent.cs | 195 ++++++++++++++++++ src/IO.Ably.Shared/Defaults.cs | 114 +--------- src/IO.Ably.Shared/Http/AblyHttpClient.cs | 2 +- src/IO.Ably.Shared/IO.Ably.Shared.projitems | 1 + src/IO.Ably.Shared/IPlatform.cs | 11 +- src/IO.Ably.Shared/IoC.cs | 2 +- .../Transport/TransportParams.cs | 2 +- .../ConnectionParameterSpecs.cs | 16 +- .../Rest/AblyHttpClientSpecs.cs | 8 +- src/IO.Ably.iOS/Platform.cs | 2 +- 13 files changed, 223 insertions(+), 140 deletions(-) create mode 100644 src/IO.Ably.Shared/Agent.cs diff --git a/src/IO.Ably.Android/Platform.cs b/src/IO.Ably.Android/Platform.cs index 3d55346b4..73ff9f369 100644 --- a/src/IO.Ably.Android/Platform.cs +++ b/src/IO.Ably.Android/Platform.cs @@ -10,7 +10,7 @@ internal class Platform : IPlatform private static readonly object _lock = new object(); internal static bool HookedUpToNetworkEvents { get; private set; } - public string PlatformId => "xamarin-android"; + public Agent.PlatformRuntime PlatformId => Agent.PlatformRuntime.XamarinAndroid; public bool SyncContextDefault => true; public ITransportFactory TransportFactory => null; diff --git a/src/IO.Ably.NETFramework/Platform.cs b/src/IO.Ably.NETFramework/Platform.cs index ba1a82241..f6765f3e6 100644 --- a/src/IO.Ably.NETFramework/Platform.cs +++ b/src/IO.Ably.NETFramework/Platform.cs @@ -16,7 +16,7 @@ static Platform() internal static bool HookedUpToNetworkEvents { get; private set; } - public string PlatformId => "framework"; + public Agent.PlatformRuntime PlatformId => Agent.PlatformRuntime.Framework; public ITransportFactory TransportFactory => null; diff --git a/src/IO.Ably.NETStandard20/Platform.cs b/src/IO.Ably.NETStandard20/Platform.cs index 42372dda1..72eeaa9b5 100644 --- a/src/IO.Ably.NETStandard20/Platform.cs +++ b/src/IO.Ably.NETStandard20/Platform.cs @@ -18,11 +18,11 @@ static Platform() // Defined as per https://learn.microsoft.com/en-us/dotnet/standard/frameworks#preprocessor-symbols #if NET6_0 - public string PlatformId => "net6.0"; + public Agent.PlatformRuntime PlatformId => Agent.PlatformRuntime.Net6; #elif NET7_0 - public string PlatformId => "net7.0"; + public Agent.PlatformRuntime PlatformId => Agent.PlatformRuntime.Net7; #else - public string PlatformId => "netstandard20"; + public Agent.PlatformRuntime PlatformId => Agent.PlatformRuntime.Netstandard20; #endif public ITransportFactory TransportFactory => null; diff --git a/src/IO.Ably.Shared/Agent.cs b/src/IO.Ably.Shared/Agent.cs new file mode 100644 index 000000000..5c55600f1 --- /dev/null +++ b/src/IO.Ably.Shared/Agent.cs @@ -0,0 +1,195 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace IO.Ably +{ + internal static class Agent + { + public enum PlatformRuntime + { + Framework, + Netstandard20, + Net6, + Net7, + XamarinAndroid, + XamarinIos, + Other, + } + + public static class OS + { + public static readonly string Windows = "dotnet-windows"; + public static readonly string MacOS = "dotnet-macOS"; + public static readonly string Linux = "dotnet-linux"; + public static readonly string Android = "dotnet-android"; + public static readonly string IOS = "dotnet-iOS"; + public static readonly string TvOS = "dotnet-tvOS"; + public static readonly string WatchOS = "dotnet-watchOS"; + public static readonly string Browser = "dotnet-browser"; + } + + internal const string AblyAgentHeader = "Ably-Agent"; + private static readonly string AblySdkIdentifier = $"ably-dotnet/{Defaults.LibraryVersion}"; // RSC7d1 + + /// + /// This returns dotnet platform as per ably-lib mappings defined in agents.json. + /// https://github.com/ably/ably-common/blob/main/protocol/agents.json. + /// This is required since we are migrating from 'X-Ably-Lib' header (RSC7b) to agent headers (RSC7d). + /// Please note that uwp platform is Deprecated and removed as a part of https://github.com/ably/ably-dotnet/pull/1101. + /// + /// Clean Platform Identifier. + internal static string DotnetRuntimeIdentifier() + { + switch (IoC.PlatformId) + { + case PlatformRuntime.Framework: + return "dotnet-framework"; + case PlatformRuntime.Netstandard20: + return "dotnet-standard"; + case PlatformRuntime.Net6: + return "dotnet6"; + case PlatformRuntime.Net7: + return "dotnet7"; + case PlatformRuntime.XamarinAndroid: + return "xamarin"; + case PlatformRuntime.XamarinIos: + return "xamarin"; + } + + return string.Empty; + } + + // Note - MAUI OS detection requires maui specific dependencies, https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device/information?view=net-maui-7.0&tabs=windows + internal static string OsIdentifier() + { + switch (IoC.PlatformId) + { + // For windows only dotnet-framework, return windows OS => https://dotnet.microsoft.com/en-us/download/dotnet-framework + case PlatformRuntime.Framework: + return OS.Windows; + case PlatformRuntime.XamarinAndroid: + return OS.Android; + case PlatformRuntime.XamarinIos: + return OS.IOS; + } + + // Preprocessors defined as per https://learn.microsoft.com/en-us/dotnet/standard/frameworks#preprocessor-symbols + // Get operating system as per https://stackoverflow.com/a/66618677 for .NET5 and greater +#if NET5_0_OR_GREATER + if (OperatingSystem.IsWindows()) + { + return OS.Windows; + } + + if (OperatingSystem.IsLinux()) + { + return OS.Linux; + } + + if (OperatingSystem.IsMacOS()) + { + return OS.MacOS; + } + + if (OperatingSystem.IsAndroid()) + { + return OS.Android; + } + + if (OperatingSystem.IsIOS()) + { + return OS.IOS; + } + + if (OperatingSystem.IsTvOS()) + { + return OS.TvOS; + } + + if (OperatingSystem.IsWatchOS()) + { + return OS.WatchOS; + } + + if (OperatingSystem.IsBrowser()) + { + return OS.Browser; + } +#endif + + // If netstandard target is used by .Net Core App, https://mariusschulz.com/blog/detecting-the-operating-system-in-net-core + try + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + return OS.Linux; + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + return OS.MacOS; + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + return OS.Windows; + } + } + catch + { + // ignored + } + + // If netstandard target is used by .Net Mono App, http://docs.go-mono.com/?link=P%3aSystem.Environment.OSVersion + // https://stackoverflow.com/questions/9129491/c-sharp-compiled-in-mono-detect-os + switch (Environment.OSVersion.Platform) + { + case PlatformID.Win32NT: + case PlatformID.Win32S: + case PlatformID.Win32Windows: + case PlatformID.WinCE: + return OS.Windows; + case PlatformID.Unix: + return OS.Linux; + case PlatformID.MacOSX: + return OS.MacOS; + } + + return string.Empty; + } + + internal static string AblyAgentIdentifier(Dictionary additionalAgents) + { + string GetAgentComponentString(string product, string version) + { + return string.IsNullOrEmpty(version) ? product : $"{product}/{version}"; + } + + void AddAgentIdentifier(ICollection currentAgentComponents, string product, string version = null) + { + if (!string.IsNullOrEmpty(product)) + { + currentAgentComponents.Add(GetAgentComponentString(product, version)); + } + } + + var agentComponents = new List(); + AddAgentIdentifier(agentComponents, AblySdkIdentifier); + AddAgentIdentifier(agentComponents, DotnetRuntimeIdentifier()); + AddAgentIdentifier(agentComponents, OsIdentifier()); + + if (additionalAgents == null) + { + return string.Join(" ", agentComponents); + } + + foreach (var agent in additionalAgents) + { + AddAgentIdentifier(agentComponents, agent.Key, agent.Value); + } + + return string.Join(" ", agentComponents); + } + } +} diff --git a/src/IO.Ably.Shared/Defaults.cs b/src/IO.Ably.Shared/Defaults.cs index 0052a99a6..cba580f26 100644 --- a/src/IO.Ably.Shared/Defaults.cs +++ b/src/IO.Ably.Shared/Defaults.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Reflection; using System.Runtime.InteropServices; +using System.Security.Cryptography; using System.Text; using IO.Ably.Transport; @@ -99,118 +100,5 @@ internal static string[] GetEnvironmentFallbackHosts(string environment) $"{environment}-e-fallback.ably-realtime.com", }; } - - internal const string AblyAgentHeader = "Ably-Agent"; - private static readonly string AblySdkIdentifier = $"ably-dotnet/{LibraryVersion}"; // RSC7d1 - - /// - /// This returns dotnet platform as per ably-lib mappings defined in agents.json. - /// https://github.com/ably/ably-common/blob/main/protocol/agents.json. - /// This is required since we are migrating from 'X-Ably-Lib' header (RSC7b) to agent headers (RSC7d). - /// Please note that uwp platform is Deprecated and removed as a part of https://github.com/ably/ably-dotnet/pull/1101. - /// - /// Clean Platform Identifier. - internal static string DotnetRuntimeIdentifier() - { - switch (IoC.PlatformId) - { - case "framework": - return "dotnet-framework"; - case "netstandard20": - return "dotnet-standard"; - case "net6.0": - return "dotnet6"; - case "net7.0": - return "dotnet7"; - case "xamarin-android": - return "xamarin-android"; - case "xamarin-ios": - return "xamarin-iOS"; - } - - return string.Empty; - } - - // Get operating system as per https://stackoverflow.com/a/66618677 - // Preprocessors defined as per https://learn.microsoft.com/en-us/dotnet/standard/frameworks#preprocessor-symbols - // Related link - https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device/information?view=net-maui-7.0&tabs=windows - internal static string OsIdentifier() - { -#if NET5_0_OR_GREATER - if (OperatingSystem.IsWindows()) - { - return "dotnet-windows"; - } - - if (OperatingSystem.IsLinux()) - { - return "dotnet-linux"; - } - - if (OperatingSystem.IsMacOS()) - { - return "dotnet-macOS"; - } - - if (OperatingSystem.IsAndroid()) - { - return "dotnet-android"; - } - - if (OperatingSystem.IsIOS()) - { - return "dotnet-iOS"; - } - - if (OperatingSystem.IsTvOS()) - { - return "dotnet-tvOS"; - } - - if (OperatingSystem.IsWatchOS()) - { - return "dotnet-watchOS"; - } - - if (OperatingSystem.IsBrowser()) - { - return "dotnet-browser"; - } -#endif - return string.Empty; - } - - internal static string AblyAgentIdentifier(Dictionary additionalAgents) - { - string GetAgentComponentString(string product, string version) - { - return string.IsNullOrEmpty(version) ? product : $"{product}/{version}"; - } - - void AddAgentIdentifier(ICollection currentAgentComponents, string product, string version = null) - { - if (!string.IsNullOrEmpty(product)) - { - currentAgentComponents.Add(GetAgentComponentString(product, version)); - } - } - - var agentComponents = new List(); - AddAgentIdentifier(agentComponents, AblySdkIdentifier); - AddAgentIdentifier(agentComponents, DotnetRuntimeIdentifier()); - AddAgentIdentifier(agentComponents, OsIdentifier()); - - if (additionalAgents == null) - { - return string.Join(" ", agentComponents); - } - - foreach (var agent in additionalAgents) - { - AddAgentIdentifier(agentComponents, agent.Key, agent.Value); - } - - return string.Join(" ", agentComponents); - } } } diff --git a/src/IO.Ably.Shared/Http/AblyHttpClient.cs b/src/IO.Ably.Shared/Http/AblyHttpClient.cs index 287107f7f..05a33337c 100644 --- a/src/IO.Ably.Shared/Http/AblyHttpClient.cs +++ b/src/IO.Ably.Shared/Http/AblyHttpClient.cs @@ -74,7 +74,7 @@ internal void CreateInternalHttpClient(TimeSpan timeout, HttpMessageHandler mess { Client = messageHandler != null ? new HttpClient(messageHandler) : new HttpClient(); Client.DefaultRequestHeaders.Add("X-Ably-Version", Defaults.ProtocolVersion); - Client.DefaultRequestHeaders.Add(Defaults.AblyAgentHeader, Defaults.AblyAgentIdentifier(Options.Agents)); // RSC7d + Client.DefaultRequestHeaders.Add(Agent.AblyAgentHeader, Agent.AblyAgentIdentifier(Options.Agents)); // RSC7d Client.Timeout = timeout; } diff --git a/src/IO.Ably.Shared/IO.Ably.Shared.projitems b/src/IO.Ably.Shared/IO.Ably.Shared.projitems index d22b5969d..3d5c5227c 100644 --- a/src/IO.Ably.Shared/IO.Ably.Shared.projitems +++ b/src/IO.Ably.Shared/IO.Ably.Shared.projitems @@ -14,6 +14,7 @@ + diff --git a/src/IO.Ably.Shared/IPlatform.cs b/src/IO.Ably.Shared/IPlatform.cs index 37d788bc5..d90983244 100644 --- a/src/IO.Ably.Shared/IPlatform.cs +++ b/src/IO.Ably.Shared/IPlatform.cs @@ -3,19 +3,18 @@ namespace IO.Ably { - [System.Diagnostics.CodeAnalysis.SuppressMessage( - "StyleCop.CSharp.DocumentationRules", - "SA1600:Elements should be documented", - Justification = "Internal interface")] - /// /// This interface is implemented for each platform .NETFramework, NetStandard, /// iOS and Android. The library dynamically creates an instance of Platform in /// IoC.cs. It lets us deal with the differences in the various platforms. /// + [System.Diagnostics.CodeAnalysis.SuppressMessage( + "StyleCop.CSharp.DocumentationRules", + "SA1600:Elements should be documented", + Justification = "Internal interface")] internal interface IPlatform { - string PlatformId { get; } + Agent.PlatformRuntime PlatformId { get; } ITransportFactory TransportFactory { get; } diff --git a/src/IO.Ably.Shared/IoC.cs b/src/IO.Ably.Shared/IoC.cs index c1c1159b1..a16fe0f25 100644 --- a/src/IO.Ably.Shared/IoC.cs +++ b/src/IO.Ably.Shared/IoC.cs @@ -39,7 +39,7 @@ static IoC() public static void RegisterOsNetworkStateChanged() => Platform.RegisterOsNetworkStateChanged(); - public static string PlatformId => Platform?.PlatformId ?? string.Empty; + public static Agent.PlatformRuntime PlatformId => Platform?.PlatformId ?? Agent.PlatformRuntime.Other; public static IMobileDevice MobileDevice { diff --git a/src/IO.Ably.Shared/Transport/TransportParams.cs b/src/IO.Ably.Shared/Transport/TransportParams.cs index 3877ac1eb..e43eecf1a 100644 --- a/src/IO.Ably.Shared/Transport/TransportParams.cs +++ b/src/IO.Ably.Shared/Transport/TransportParams.cs @@ -189,7 +189,7 @@ public Dictionary GetParams() } result["v"] = Defaults.ProtocolVersion; - result[Defaults.AblyAgentHeader] = Defaults.AblyAgentIdentifier(Agents); + result[Agent.AblyAgentHeader] = Agent.AblyAgentIdentifier(Agents); // Url encode all the params at the time of creating the query string result["format"] = UseBinaryProtocol ? "msgpack" : "json"; diff --git a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs index e87a28f1b..20955e4d7 100644 --- a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionParameterSpecs.cs @@ -125,13 +125,13 @@ public async Task ShouldSetTransportAblyAgentHeader() { _ = await GetConnectedClient(); - LastCreatedTransport.Parameters.GetParams().Should().ContainKey(Defaults.AblyAgentHeader); - var agentValues = LastCreatedTransport.Parameters.GetParams()[Defaults.AblyAgentHeader].Split(' '); + LastCreatedTransport.Parameters.GetParams().Should().ContainKey(Agent.AblyAgentHeader); + var agentValues = LastCreatedTransport.Parameters.GetParams()[Agent.AblyAgentHeader].Split(' '); var keys = new List() { "ably-dotnet/", - Defaults.DotnetRuntimeIdentifier(), - Defaults.OsIdentifier() + Agent.DotnetRuntimeIdentifier(), + Agent.OsIdentifier() }; keys.RemoveAll(s => s == string.Empty); @@ -156,13 +156,13 @@ public async Task ShouldSetTransportCustomAblyAgentHeader() }; }); - LastCreatedTransport.Parameters.GetParams().Should().ContainKey(Defaults.AblyAgentHeader); - var agentValues = LastCreatedTransport.Parameters.GetParams()[Defaults.AblyAgentHeader].Split(' '); + LastCreatedTransport.Parameters.GetParams().Should().ContainKey(Agent.AblyAgentHeader); + var agentValues = LastCreatedTransport.Parameters.GetParams()[Agent.AblyAgentHeader].Split(' '); var keys = new List() { "ably-dotnet/", - Defaults.DotnetRuntimeIdentifier(), - Defaults.OsIdentifier(), + Agent.DotnetRuntimeIdentifier(), + Agent.OsIdentifier(), "agent1", "agent2", }; diff --git a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs index 33eb2be2c..ba32c82b1 100644 --- a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs @@ -98,8 +98,8 @@ public async Task WhenCallingUrl_AddsDefaultAblyAgentHeader() var keys = new List() { "ably-dotnet/", - Defaults.DotnetRuntimeIdentifier(), - Defaults.OsIdentifier() + Agent.DotnetRuntimeIdentifier(), + Agent.OsIdentifier() }; keys.RemoveAll(s => s == string.Empty); @@ -137,8 +137,8 @@ public async Task WhenCallingUrl_AddsCustomizedAblyAgentHeader() var keys = new List() { "ably-dotnet/", - Defaults.DotnetRuntimeIdentifier(), - Defaults.OsIdentifier(), + Agent.DotnetRuntimeIdentifier(), + Agent.OsIdentifier(), "agent1", "agent2", }; diff --git a/src/IO.Ably.iOS/Platform.cs b/src/IO.Ably.iOS/Platform.cs index 4382b0c5f..6c65efa27 100644 --- a/src/IO.Ably.iOS/Platform.cs +++ b/src/IO.Ably.iOS/Platform.cs @@ -10,7 +10,7 @@ internal class Platform : IPlatform private static readonly object _lock = new object(); internal static bool HookedUpToNetworkEvents { get; private set; } - public string PlatformId => "xamarin-ios"; + public Agent.PlatformRuntime PlatformId => Agent.PlatformRuntime.XamarinIos; public ITransportFactory TransportFactory => null; public IMobileDevice MobileDevice { get; set; } From a6f72b5f7f00cfe5f8b514040b2baef897d8d2a9 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 14:50:51 +0530 Subject: [PATCH 60/72] Added operating system under agents to the capabilities.yaml file --- .ably/capabilities.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ably/capabilities.yaml b/.ably/capabilities.yaml index a1ab64a36..a38444fc1 100644 --- a/.ably/capabilities.yaml +++ b/.ably/capabilities.yaml @@ -4,6 +4,7 @@ common-version: 1.2.0 compliance: Agent Identifier: Agents: + Operating System: Runtime: Authentication: API Key: From 24092d0cfa88d128f5a1865bc19858d9a1b546a7 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 18:04:30 +0530 Subject: [PATCH 61/72] Updated build.fs to by default build for Netstandard project --- build-script/build.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-script/build.fs b/build-script/build.fs index f706367fe..793a12339 100644 --- a/build-script/build.fs +++ b/build-script/build.fs @@ -538,11 +538,11 @@ let initTargets (argv) = let main argv = argv |> Array.toList - |> Context.FakeExecutionContext.Create false "build-script.fsx" + |> Context.FakeExecutionContext.Create false "build.fsx" |> Context.RuntimeContext.Fake |> Context.setExecutionContext initTargets (argv) - Target.runOrDefaultWithArguments "Build.NetFramework" + Target.runOrDefaultWithArguments "Build.NetStandard" 0 // return an integer exit code From 134f6f89b891ecfc3d19769e24b6293017b37396 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sun, 16 Apr 2023 18:05:12 +0530 Subject: [PATCH 62/72] Updated build script README, added section for runnint unit and integration tests --- CONTRIBUTING.md | 11 ++------ build-script/README.md | 62 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc7302873..67f6485f9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,15 +11,8 @@ ## Building and Packaging -The build scripts are written using ```fake``` and need to be run on Windows with Visual Studio 2019 installed. Fake and nuget.exe can be installed via [chocolatey](https://chocolatey.org) - -```shell -choco install fake -choco install nuget.commandline -``` - -Running `.\build.cmd` will start the build process and run the tests. By default it runs the NetFramework tests. -To run the Net6.0 and Net7.0 build and tests you can run `.\build.cmd Test.NetStandard` +- The build scripts are written using [fake](https://fake.build/index.html) and need to be run on Windows with Visual Studio 2019+ installed. +- For more information on building, testing and packaging, take a look at [FAKE build scripts](./build-script/README.md). ## Working from source diff --git a/build-script/README.md b/build-script/README.md index 49b0ab55b..c519bdee8 100644 --- a/build-script/README.md +++ b/build-script/README.md @@ -1,11 +1,67 @@ -### Fake Scripts for building and testing ably-dotnet SDK +### F# project for building and testing ably-dotnet SDK -- Download fake tools by running following command at root +- This is a F# project created as per [Run-FAKE-using-a-dedicated-build-project](https://fake.build/guide/getting-started.html#Run-FAKE-using-a-dedicated-build-project). +- This contains scripts to build, test and package projects targetting multiple platforms. +- Clone the project and download fake tools by running following command at root. ``` dotnet tool restore ``` +- Running `.\build.cmd` will start the build process. By default it builds NetStandard project. -- Format `build.fs` using +### Build Netframework +- We have a dedicated netframework project targeting .NetFramework 4.6+. +- Build NetFramework project +``` +./build.cmd Build.NetFramework +``` + +### Build NetStandard +- Netstandard currently supports explicit targets for netstandard2.0, net6.0 and net7.0. +- Build NetStandard project +``` +./build.sh Build.NetStandard +``` + +### Build Xamarin +- We have a xamarin solution targetting android and iOS. +- Build Xamarin project +``` +./build.sh Build.Xamarin +``` +### Test Netframework +Run unit tests +``` +./build.cmd Test.NetFramework.Unit +./build.cmd Test.NetFramework.Unit.WithRetry // Retry failed tests +``` +Run integration tests +``` +./build.cmd Test.NetFramework.Integration +./build.cmd Test.NetFramework.Integration.WithRetry // Retry failed tests +``` + + +### Test NetStandard +Run unit tests +``` +./build.sh Test.NetStandard.Unit +./build.sh Test.NetStandard.Unit.WithRetry // Retry failed tests +``` +Run integration tests +``` +./build.sh Test.NetStandard.Integration +./build.sh Test.NetStandard.Integration.WithRetry // Retry failed tests +``` +- Additional `-f` flag can be supplied to test for target framework `net6.0` or `net7.0` +``` +./build.sh Test.NetStandard.Unit -f net6.0 // run tests for .Net6.0 runtime +./build.sh Test.NetStandard.Unit -f net7.0 // run tests for .Net7.0 runtime +``` + + +### Development +- Please refer to [Getting Started](https://fake.build/guide/what-is-fake.html) for detailed documentation. +- Format `build.fs` by running following command at root. ``` dotnet fantomas .\build-script\build.fs From 4f29898f70b8be71030349d51e539c804f9deeae Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Mon, 17 Apr 2023 11:11:08 +0530 Subject: [PATCH 63/72] Added steps to test xamarin build against netframework --- .github/workflows/build-xamarin-macos.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-xamarin-macos.yml b/.github/workflows/build-xamarin-macos.yml index aa550a8e4..4ba797987 100644 --- a/.github/workflows/build-xamarin-macos.yml +++ b/.github/workflows/build-xamarin-macos.yml @@ -1,4 +1,4 @@ -name: "Xamarin Build: macOS" +name: "Xamarin Build and Test: macOS" on: pull_request: push: @@ -32,3 +32,9 @@ jobs: - name: Build Xamarin projects run: ./build.sh Build.Xamarin + + - name: Unit tests + run: ./build.sh Test.NetFramework.Unit.WithRetry + + - name: Integration tests + run: ./build.sh Test.NetFramework.Integration.WithRetry From d1cc43f1e3fc185ee473be85ebfd63ec11ab2d37 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Mon, 17 Apr 2023 11:31:11 +0530 Subject: [PATCH 64/72] Added step to create nuget package in build script README --- build-script/README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/build-script/README.md b/build-script/README.md index c519bdee8..6350b6a8d 100644 --- a/build-script/README.md +++ b/build-script/README.md @@ -1,4 +1,4 @@ -### F# project for building and testing ably-dotnet SDK +### F# project for building, testing and packaging ably-dotnet SDK - This is a F# project created as per [Run-FAKE-using-a-dedicated-build-project](https://fake.build/guide/getting-started.html#Run-FAKE-using-a-dedicated-build-project). - This contains scripts to build, test and package projects targetting multiple platforms. @@ -58,6 +58,24 @@ Run integration tests ./build.sh Test.NetStandard.Unit -f net7.0 // run tests for .Net7.0 runtime ``` +### Create Nuget packages +- Currently, we have two scripts to generate nuget packages +1. package.sh => +- Responsible for creating core `ably.io` nuget package. +``` +./package.sh 1.2.3 +``` +- Above command creates `ably.io.1.2.3.nupkg` package at root. +- During release process, this package is hosted on [nuget-ably.io](https://www.nuget.org/packages/ably.io). + +2. package-push.sh => +- Responsible for creating push packages for android and iOS. +- Please take a look at [Push Notif Doc](../PushNotifications.md) for usage. +``` +./package-push.sh 1.2.3 +``` +- Above command creates `ably.io.push.android.1.2.3.nupkg` and `ably.io.push.ios.1.2.3` package at root. +- During release process, this package is hosted on [nuget-ably.io.push.android](https://www.nuget.org/packages/ably.io.push.android) and [nuget-ably.io.push.ios](https://www.nuget.org/packages/ably.io.push.ios). ### Development - Please refer to [Getting Started](https://fake.build/guide/what-is-fake.html) for detailed documentation. From 6da24c101b15eeaf9865cf5808a26ab8875aa338 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Mon, 17 Apr 2023 11:35:38 +0530 Subject: [PATCH 65/72] Refactored xamarin macOS build file --- ...{build-xamarin-macos.yml => run-tests-macos-xamarin.yml} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{build-xamarin-macos.yml => run-tests-macos-xamarin.yml} (84%) diff --git a/.github/workflows/build-xamarin-macos.yml b/.github/workflows/run-tests-macos-xamarin.yml similarity index 84% rename from .github/workflows/build-xamarin-macos.yml rename to .github/workflows/run-tests-macos-xamarin.yml index 4ba797987..474b0d000 100644 --- a/.github/workflows/build-xamarin-macos.yml +++ b/.github/workflows/run-tests-macos-xamarin.yml @@ -1,4 +1,4 @@ -name: "Xamarin Build and Test: macOS" +name: "Unit and Integration Test: macOS (Xamarin)" on: pull_request: push: @@ -33,8 +33,8 @@ jobs: - name: Build Xamarin projects run: ./build.sh Build.Xamarin - - name: Unit tests + - name: Run Unit tests using mono run: ./build.sh Test.NetFramework.Unit.WithRetry - - name: Integration tests + - name: Run Integration tests using mono run: ./build.sh Test.NetFramework.Integration.WithRetry From 005b6f6989f23b715910c833b7b2deef41047c67 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 28 Apr 2023 23:26:07 +0530 Subject: [PATCH 66/72] Refactored contributing doc as per comments, removed windows dependency to run fake scripts --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 67f6485f9..b7d5073c5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ ## Building and Packaging -- The build scripts are written using [fake](https://fake.build/index.html) and need to be run on Windows with Visual Studio 2019+ installed. +- The build scripts are written using [fake build project](https://fake.build/guide/getting-started.html#Run-FAKE-using-a-dedicated-build-project). - For more information on building, testing and packaging, take a look at [FAKE build scripts](./build-script/README.md). ## Working from source From ec94c07e989a6c7c675bd84118ff4c00a2e2b97e Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 28 Apr 2023 23:31:26 +0530 Subject: [PATCH 67/72] Refactored ably agent header test for removing keys --- src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs index ba32c82b1..44dd28b4e 100644 --- a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs @@ -102,7 +102,7 @@ public async Task WhenCallingUrl_AddsDefaultAblyAgentHeader() Agent.OsIdentifier() }; - keys.RemoveAll(s => s == string.Empty); + keys.RemoveAll(s => s.IsEmpty()); agentValues.Should().HaveCount(keys.Count); for (var i = 0; i < keys.Count; ++i) @@ -143,7 +143,7 @@ public async Task WhenCallingUrl_AddsCustomizedAblyAgentHeader() "agent2", }; - keys.RemoveAll(s => s == string.Empty); + keys.RemoveAll(s => s.IsEmpty()); agentValues.Should().HaveCount(keys.Count); for (var i = 0; i < keys.Count; ++i) From 1238d6d044863047549b8b92c14ba969f7d1dc0c Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 28 Apr 2023 23:38:21 +0530 Subject: [PATCH 68/72] Refactored OS static class from static readonly string to const --- src/IO.Ably.Shared/Agent.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/IO.Ably.Shared/Agent.cs b/src/IO.Ably.Shared/Agent.cs index 5c55600f1..d42d2b076 100644 --- a/src/IO.Ably.Shared/Agent.cs +++ b/src/IO.Ably.Shared/Agent.cs @@ -19,14 +19,14 @@ public enum PlatformRuntime public static class OS { - public static readonly string Windows = "dotnet-windows"; - public static readonly string MacOS = "dotnet-macOS"; - public static readonly string Linux = "dotnet-linux"; - public static readonly string Android = "dotnet-android"; - public static readonly string IOS = "dotnet-iOS"; - public static readonly string TvOS = "dotnet-tvOS"; - public static readonly string WatchOS = "dotnet-watchOS"; - public static readonly string Browser = "dotnet-browser"; + public const string Windows = "dotnet-windows"; + public const string MacOS = "dotnet-macOS"; + public const string Linux = "dotnet-linux"; + public const string Android = "dotnet-android"; + public const string IOS = "dotnet-iOS"; + public const string TvOS = "dotnet-tvOS"; + public const string WatchOS = "dotnet-watchOS"; + public const string Browser = "dotnet-browser"; } internal const string AblyAgentHeader = "Ably-Agent"; From 1e4b09b36882ed695d005b883b6c8ee4f9be92da Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 29 Apr 2023 23:40:22 +0530 Subject: [PATCH 69/72] Added dotnet runtime version to runtime identifier --- src/IO.Ably.Shared/Agent.cs | 49 ++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/src/IO.Ably.Shared/Agent.cs b/src/IO.Ably.Shared/Agent.cs index d42d2b076..46ac9ec0c 100644 --- a/src/IO.Ably.Shared/Agent.cs +++ b/src/IO.Ably.Shared/Agent.cs @@ -41,23 +41,44 @@ public static class OS /// Clean Platform Identifier. internal static string DotnetRuntimeIdentifier() { - switch (IoC.PlatformId) + string DotnetRuntimeName() { - case PlatformRuntime.Framework: - return "dotnet-framework"; - case PlatformRuntime.Netstandard20: - return "dotnet-standard"; - case PlatformRuntime.Net6: - return "dotnet6"; - case PlatformRuntime.Net7: - return "dotnet7"; - case PlatformRuntime.XamarinAndroid: - return "xamarin"; - case PlatformRuntime.XamarinIos: - return "xamarin"; + switch (IoC.PlatformId) + { + case PlatformRuntime.Framework: + return "dotnet-framework"; + case PlatformRuntime.Netstandard20: + return "dotnet-standard"; + case PlatformRuntime.Net6: + return "dotnet6"; + case PlatformRuntime.Net7: + return "dotnet7"; + case PlatformRuntime.XamarinAndroid: + return "xamarin"; + case PlatformRuntime.XamarinIos: + return "xamarin"; + } + return string.Empty; } - return string.Empty; + var dotnetRuntimeName = DotnetRuntimeName(); + + string DotnetRuntimeVersion() + { + try + { + return Environment.Version.ToString(); + } + catch + { + return string.Empty; + } + } + + var dotnetRuntimeVersion = DotnetRuntimeVersion(); + + return dotnetRuntimeVersion.IsEmpty() ? + dotnetRuntimeName : $"{dotnetRuntimeName}/{dotnetRuntimeVersion}"; } // Note - MAUI OS detection requires maui specific dependencies, https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device/information?view=net-maui-7.0&tabs=windows From cf17e47049cbf976ed88fe59c36ca97e370bd846 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 29 Apr 2023 23:42:59 +0530 Subject: [PATCH 70/72] Added test to check dotnetRuntimeIdentifier should also contain version --- src/IO.Ably.Shared/Agent.cs | 1 + src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/IO.Ably.Shared/Agent.cs b/src/IO.Ably.Shared/Agent.cs index 46ac9ec0c..536b51370 100644 --- a/src/IO.Ably.Shared/Agent.cs +++ b/src/IO.Ably.Shared/Agent.cs @@ -58,6 +58,7 @@ string DotnetRuntimeName() case PlatformRuntime.XamarinIos: return "xamarin"; } + return string.Empty; } diff --git a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs index 44dd28b4e..762ef8aca 100644 --- a/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Rest/AblyHttpClientSpecs.cs @@ -102,6 +102,8 @@ public async Task WhenCallingUrl_AddsDefaultAblyAgentHeader() Agent.OsIdentifier() }; + Agent.DotnetRuntimeIdentifier().Split('/').Length.Should().Be(2); + keys.RemoveAll(s => s.IsEmpty()); agentValues.Should().HaveCount(keys.Count); From d2d9925c8d8f26ff94ed72699f4f64bca59ec900 Mon Sep 17 00:00:00 2001 From: sachin shinde Date: Fri, 5 May 2023 09:03:26 +0000 Subject: [PATCH 71/72] marked mono-install script as executable, removed unnecessary step from xamarin workflow --- .github/workflows/run-tests-macos-xamarin.yml | 1 - tools/mono-install.sh | 0 2 files changed, 1 deletion(-) mode change 100644 => 100755 tools/mono-install.sh diff --git a/.github/workflows/run-tests-macos-xamarin.yml b/.github/workflows/run-tests-macos-xamarin.yml index 474b0d000..0d2666546 100644 --- a/.github/workflows/run-tests-macos-xamarin.yml +++ b/.github/workflows/run-tests-macos-xamarin.yml @@ -27,7 +27,6 @@ jobs: - name: Install mono run: | - chmod +x ./tools/mono-install.sh ./tools/mono-install.sh - name: Build Xamarin projects diff --git a/tools/mono-install.sh b/tools/mono-install.sh old mode 100644 new mode 100755 From eefe118799c3152e20f27706882caa8cf8327f9b Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 5 May 2023 14:36:19 +0530 Subject: [PATCH 72/72] Added dispose method to the jwtSandboxSpec, implemented dispose for httpClient --- src/IO.Ably.Tests.Shared/Rest/JwtSandboxSpec.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/IO.Ably.Tests.Shared/Rest/JwtSandboxSpec.cs b/src/IO.Ably.Tests.Shared/Rest/JwtSandboxSpec.cs index e8e4aedbc..2cb96e581 100644 --- a/src/IO.Ably.Tests.Shared/Rest/JwtSandboxSpec.cs +++ b/src/IO.Ably.Tests.Shared/Rest/JwtSandboxSpec.cs @@ -215,5 +215,11 @@ private async Task GetJwtStringAsync( var jwtStr = await _httpClient.GetStringAsync(builder.Uri); return jwtStr; } + + protected override void Dispose(bool disposing) + { + _httpClient.Dispose(); + base.Dispose(disposing); + } } }