From afd56a7f6fdc9d54119b48484db58dfa1975f794 Mon Sep 17 00:00:00 2001 From: JanEggers Date: Sun, 12 Nov 2017 09:22:17 +0100 Subject: [PATCH 1/3] added indication of what Mqtt TargetFramework is used --- .../TargetFrameworkInfoProvider.cs | 23 +++++++++++++++++++ .../MQTTnet.TestApp.NetCore.csproj | 2 +- Tests/MQTTnet.TestApp.NetCore/Program.cs | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 Frameworks/MQTTnet.NetStandard/TargetFrameworkInfoProvider.cs diff --git a/Frameworks/MQTTnet.NetStandard/TargetFrameworkInfoProvider.cs b/Frameworks/MQTTnet.NetStandard/TargetFrameworkInfoProvider.cs new file mode 100644 index 0000000..22369d9 --- /dev/null +++ b/Frameworks/MQTTnet.NetStandard/TargetFrameworkInfoProvider.cs @@ -0,0 +1,23 @@ +namespace MQTTnet +{ + public static class TargetFrameworkInfoProvider + { + public static string TargetFramework + { + get + { +#if NET452 + return "net452"; +#elif NET461 + return "net461"; +#elif NETSTANDARD1_3 + return "netstandard1.3"; +#elif NETSTANDARD2_0 + return "netstandard2.0"; +#elif WINDOWS_UWP + return "uap10.0"; +#endif + } + } + } +} \ No newline at end of file diff --git a/Tests/MQTTnet.TestApp.NetCore/MQTTnet.TestApp.NetCore.csproj b/Tests/MQTTnet.TestApp.NetCore/MQTTnet.TestApp.NetCore.csproj index 80d6a26..d89bdd3 100644 --- a/Tests/MQTTnet.TestApp.NetCore/MQTTnet.TestApp.NetCore.csproj +++ b/Tests/MQTTnet.TestApp.NetCore/MQTTnet.TestApp.NetCore.csproj @@ -3,7 +3,7 @@ Exe Full - netcoreapp2.0;net452 + netcoreapp2.0;net452;net461 diff --git a/Tests/MQTTnet.TestApp.NetCore/Program.cs b/Tests/MQTTnet.TestApp.NetCore/Program.cs index 4283087..d1c010f 100644 --- a/Tests/MQTTnet.TestApp.NetCore/Program.cs +++ b/Tests/MQTTnet.TestApp.NetCore/Program.cs @@ -15,7 +15,7 @@ namespace MQTTnet.TestApp.NetCore { public static void Main() { - Console.WriteLine("MQTTnet - TestApp.NetFramework"); + Console.WriteLine($"MQTTnet - TestApp.{TargetFrameworkInfoProvider.TargetFramework}"); Console.WriteLine("1 = Start client"); Console.WriteLine("2 = Start server"); Console.WriteLine("3 = Start performance test"); From bc9757576090b16d7117c4271dc2d434f6ac6ba5 Mon Sep 17 00:00:00 2001 From: JanEggers Date: Sun, 12 Nov 2017 12:28:55 +0100 Subject: [PATCH 2/3] downgrade dependencies to be netstandard 1.3 compliant and remove net461 shim requirement --- Build/MQTTnet.nuspec | 14 +++++++------- .../MQTTnet.NetStandard/MQTTnet.Netstandard.csproj | 8 ++++---- MQTTnet.Core/MQTTnet.Core.csproj | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Build/MQTTnet.nuspec b/Build/MQTTnet.nuspec index 2e56aa3..1b01bfd 100644 --- a/Build/MQTTnet.nuspec +++ b/Build/MQTTnet.nuspec @@ -18,10 +18,10 @@ - - - - + + + + @@ -47,9 +47,9 @@ - - - + + + diff --git a/Frameworks/MQTTnet.NetStandard/MQTTnet.Netstandard.csproj b/Frameworks/MQTTnet.NetStandard/MQTTnet.Netstandard.csproj index 266864d..19d1ce0 100644 --- a/Frameworks/MQTTnet.NetStandard/MQTTnet.Netstandard.csproj +++ b/Frameworks/MQTTnet.NetStandard/MQTTnet.Netstandard.csproj @@ -53,8 +53,8 @@ - - + + @@ -64,8 +64,8 @@ - - + + \ No newline at end of file diff --git a/MQTTnet.Core/MQTTnet.Core.csproj b/MQTTnet.Core/MQTTnet.Core.csproj index 71a518d..522b3fb 100644 --- a/MQTTnet.Core/MQTTnet.Core.csproj +++ b/MQTTnet.Core/MQTTnet.Core.csproj @@ -23,8 +23,8 @@ - - + + From 5cbbfedcce237d286ed18a7515037377d99a7b93 Mon Sep 17 00:00:00 2001 From: JanEggers Date: Sun, 12 Nov 2017 12:33:56 +0100 Subject: [PATCH 3/3] added testproject for importing mqtt nugets and verify bin folder --- MQTTnet.sln | 21 ++++++++++++++++++- .../MQTTnet.Test.NugetConsumption.csproj | 12 +++++++++++ .../MQTTnet.Test.NugetConsumption/Program.cs | 12 +++++++++++ .../nuget.config | 15 +++++++++++++ 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 Tests/MQTTnet.Test.NugetConsumption/MQTTnet.Test.NugetConsumption.csproj create mode 100644 Tests/MQTTnet.Test.NugetConsumption/Program.cs create mode 100644 Tests/MQTTnet.Test.NugetConsumption/nuget.config diff --git a/MQTTnet.sln b/MQTTnet.sln index 86fee97..1aeecd6 100644 --- a/MQTTnet.sln +++ b/MQTTnet.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.27004.2006 +VisualStudioVersion = 15.0.27004.2008 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.Core.Tests", "Tests\MQTTnet.Core.Tests\MQTTnet.Core.Tests.csproj", "{A7FF0C91-25DE-4BA6-B39E-F54E8DADF1CC}" EndProject @@ -35,6 +35,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.TestApp.AspNetCore2 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.AspNetCore", "Frameworks\MQTTnet.AspnetCore\MQTTnet.AspNetCore.csproj", "{F10C4060-F7EE-4A83-919F-FF723E72F94A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MQTTnet.Test.NugetConsumption", "Tests\MQTTnet.Test.NugetConsumption\MQTTnet.Test.NugetConsumption.csproj", "{21AD2970-A8C7-4689-A35B-88082AFDABF8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -165,6 +167,22 @@ Global {F10C4060-F7EE-4A83-919F-FF723E72F94A}.Release|x64.Build.0 = Release|Any CPU {F10C4060-F7EE-4A83-919F-FF723E72F94A}.Release|x86.ActiveCfg = Release|Any CPU {F10C4060-F7EE-4A83-919F-FF723E72F94A}.Release|x86.Build.0 = Release|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Debug|ARM.ActiveCfg = Debug|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Debug|ARM.Build.0 = Debug|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Debug|x64.ActiveCfg = Debug|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Debug|x64.Build.0 = Debug|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Debug|x86.ActiveCfg = Debug|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Debug|x86.Build.0 = Debug|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Release|Any CPU.Build.0 = Release|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Release|ARM.ActiveCfg = Release|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Release|ARM.Build.0 = Release|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Release|x64.ActiveCfg = Release|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Release|x64.Build.0 = Release|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Release|x86.ActiveCfg = Release|Any CPU + {21AD2970-A8C7-4689-A35B-88082AFDABF8}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -176,6 +194,7 @@ Global {3D283AAD-AAA8-4339-8394-52F80B6304DB} = {9248C2E1-B9D6-40BF-81EC-86004D7765B4} {C6FF8AEA-0855-41EC-A1F3-AC262225BAB9} = {9248C2E1-B9D6-40BF-81EC-86004D7765B4} {F10C4060-F7EE-4A83-919F-FF723E72F94A} = {32A630A7-2598-41D7-B625-204CD906F5FB} + {21AD2970-A8C7-4689-A35B-88082AFDABF8} = {9248C2E1-B9D6-40BF-81EC-86004D7765B4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {07536672-5CBC-4BE3-ACE0-708A431A7894} diff --git a/Tests/MQTTnet.Test.NugetConsumption/MQTTnet.Test.NugetConsumption.csproj b/Tests/MQTTnet.Test.NugetConsumption/MQTTnet.Test.NugetConsumption.csproj new file mode 100644 index 0000000..3844ef8 --- /dev/null +++ b/Tests/MQTTnet.Test.NugetConsumption/MQTTnet.Test.NugetConsumption.csproj @@ -0,0 +1,12 @@ + + + + Exe + netcoreapp2.0;net452;net461 + + + + + + + diff --git a/Tests/MQTTnet.Test.NugetConsumption/Program.cs b/Tests/MQTTnet.Test.NugetConsumption/Program.cs new file mode 100644 index 0000000..09ff6c9 --- /dev/null +++ b/Tests/MQTTnet.Test.NugetConsumption/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace MQTTnet.Test.NugetConsumption +{ + class Program + { + static void Main(string[] args) + { + var server = new MqttFactory().CreateMqttServer(); + } + } +} diff --git a/Tests/MQTTnet.Test.NugetConsumption/nuget.config b/Tests/MQTTnet.Test.NugetConsumption/nuget.config new file mode 100644 index 0000000..65d399f --- /dev/null +++ b/Tests/MQTTnet.Test.NugetConsumption/nuget.config @@ -0,0 +1,15 @@ + + + + + + + + + + \ No newline at end of file