mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-26 16:24:10 +08:00
Merge pull request #102 from JanEggers/targetframeworkfix
added net461 build
This commit is contained in:
@@ -52,6 +52,12 @@
|
|||||||
<dependency id="Microsoft.Extensions.Options" version="1.0.2" />
|
<dependency id="Microsoft.Extensions.Options" version="1.0.2" />
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
|
<group targetFramework="net461">
|
||||||
|
<dependency id="Microsoft.Extensions.DependencyInjection" version="2.0.0" />
|
||||||
|
<dependency id="Microsoft.Extensions.Logging" version="2.0.0" />
|
||||||
|
<dependency id="Microsoft.Extensions.Options" version="2.0.0" />
|
||||||
|
</group>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
||||||
@@ -71,6 +77,9 @@
|
|||||||
<!-- .NET Framework -->
|
<!-- .NET Framework -->
|
||||||
<file src="..\Frameworks\MQTTnet.Netstandard\bin\Release\net452\MQTTnet.Core.*" target="lib\net452\"/>
|
<file src="..\Frameworks\MQTTnet.Netstandard\bin\Release\net452\MQTTnet.Core.*" target="lib\net452\"/>
|
||||||
<file src="..\Frameworks\MQTTnet.Netstandard\bin\Release\net452\MQTTnet.*" target="lib\net452\"/>
|
<file src="..\Frameworks\MQTTnet.Netstandard\bin\Release\net452\MQTTnet.*" target="lib\net452\"/>
|
||||||
|
|
||||||
|
<file src="..\Frameworks\MQTTnet.Netstandard\bin\Release\net461\MQTTnet.Core.*" target="lib\net461\"/>
|
||||||
|
<file src="..\Frameworks\MQTTnet.Netstandard\bin\Release\net461\MQTTnet.*" target="lib\net461\"/>
|
||||||
|
|
||||||
</files>
|
</files>
|
||||||
</package>
|
</package>
|
||||||
@@ -9,6 +9,7 @@ if ($path) {
|
|||||||
$msbuild = join-path $path 'MSBuild\15.0\Bin\MSBuild.exe'
|
$msbuild = join-path $path 'MSBuild\15.0\Bin\MSBuild.exe'
|
||||||
|
|
||||||
&$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net452" /p:FileVersion=$version /p:AssemblyVersion=$version /verbosity:m
|
&$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net452" /p:FileVersion=$version /p:AssemblyVersion=$version /verbosity:m
|
||||||
|
&$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net461" /p:FileVersion=$version /p:AssemblyVersion=$version /verbosity:m
|
||||||
&$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard1.3" /p:FileVersion=$version /p:AssemblyVersion=$version /verbosity:m
|
&$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard1.3" /p:FileVersion=$version /p:AssemblyVersion=$version /verbosity:m
|
||||||
&$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$version /p:AssemblyVersion=$version /verbosity:m
|
&$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$version /p:AssemblyVersion=$version /verbosity:m
|
||||||
&$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$version /p:AssemblyVersion=$version /verbosity:m
|
&$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$version /p:AssemblyVersion=$version /verbosity:m
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if NET452 || NETSTANDARD1_3 || NETSTANDARD2_0
|
#if NET452 || NET461 || NETSTANDARD1_3 || NETSTANDARD2_0
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Security;
|
using System.Net.Security;
|
||||||
@@ -98,7 +98,7 @@ namespace MQTTnet.Implementations
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
//todo: else branch can be used with min dependency NET46
|
//todo: else branch can be used with min dependency NET46
|
||||||
#if NET452
|
#if NET452 || NET461
|
||||||
var clientSocket = await Task.Factory.FromAsync(_defaultEndpointSocket.BeginAccept, _defaultEndpointSocket.EndAccept, null).ConfigureAwait(false);
|
var clientSocket = await Task.Factory.FromAsync(_defaultEndpointSocket.BeginAccept, _defaultEndpointSocket.EndAccept, null).ConfigureAwait(false);
|
||||||
#else
|
#else
|
||||||
var clientSocket = await _defaultEndpointSocket.AcceptAsync().ConfigureAwait(false);
|
var clientSocket = await _defaultEndpointSocket.AcceptAsync().ConfigureAwait(false);
|
||||||
@@ -122,7 +122,7 @@ namespace MQTTnet.Implementations
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
#if NET452
|
#if NET452 || NET461
|
||||||
var clientSocket = await Task.Factory.FromAsync(_tlsEndpointSocket.BeginAccept, _tlsEndpointSocket.EndAccept, null).ConfigureAwait(false);
|
var clientSocket = await Task.Factory.FromAsync(_tlsEndpointSocket.BeginAccept, _tlsEndpointSocket.EndAccept, null).ConfigureAwait(false);
|
||||||
#else
|
#else
|
||||||
var clientSocket = await _tlsEndpointSocket.AcceptAsync().ConfigureAwait(false);
|
var clientSocket = await _tlsEndpointSocket.AcceptAsync().ConfigureAwait(false);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if NET452 || NETSTANDARD1_3 || NETSTANDARD2_0
|
#if NET452 || NET461 || NETSTANDARD1_3 || NETSTANDARD2_0
|
||||||
using System;
|
using System;
|
||||||
using System.Net.Security;
|
using System.Net.Security;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
@@ -17,7 +17,7 @@ namespace MQTTnet.Implementations
|
|||||||
private readonly MqttClientTcpOptions _options;
|
private readonly MqttClientTcpOptions _options;
|
||||||
|
|
||||||
//todo: this can be used with min dependency NetStandard1.6
|
//todo: this can be used with min dependency NetStandard1.6
|
||||||
#if NET452
|
#if NET452 || NET461
|
||||||
// ReSharper disable once MemberCanBePrivate.Global
|
// ReSharper disable once MemberCanBePrivate.Global
|
||||||
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global
|
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global
|
||||||
public static int BufferSize { get; set; } = 4096 * 20; // Can be changed for fine tuning by library user.
|
public static int BufferSize { get; set; } = 4096 * 20; // Can be changed for fine tuning by library user.
|
||||||
@@ -59,7 +59,7 @@ namespace MQTTnet.Implementations
|
|||||||
}
|
}
|
||||||
|
|
||||||
//todo: else brach can be used with min dependency NET46
|
//todo: else brach can be used with min dependency NET46
|
||||||
#if NET452
|
#if NET452 || NET461
|
||||||
await Task.Factory.FromAsync(_socket.BeginConnect, _socket.EndConnect, _options.Server, _options.GetPort(), null).ConfigureAwait(false);
|
await Task.Factory.FromAsync(_socket.BeginConnect, _socket.EndConnect, _options.Server, _options.GetPort(), null).ConfigureAwait(false);
|
||||||
#else
|
#else
|
||||||
await _socket.ConnectAsync(_options.Server, _options.GetPort()).ConfigureAwait(false);
|
await _socket.ConnectAsync(_options.Server, _options.GetPort()).ConfigureAwait(false);
|
||||||
@@ -144,7 +144,7 @@ namespace MQTTnet.Implementations
|
|||||||
//need two streams otherwise read and write have to be synchronized
|
//need two streams otherwise read and write have to be synchronized
|
||||||
|
|
||||||
//todo: if branch can be used with min dependency NetStandard1.6
|
//todo: if branch can be used with min dependency NetStandard1.6
|
||||||
#if NET452
|
#if NET452 || NET461
|
||||||
SendStream = new BufferedStream(stream, BufferSize);
|
SendStream = new BufferedStream(stream, BufferSize);
|
||||||
ReceiveStream = new BufferedStream(stream, BufferSize);
|
ReceiveStream = new BufferedStream(stream, BufferSize);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard1.3;netstandard2.0;net452;uap10.0</TargetFrameworks>
|
<TargetFrameworks>netstandard1.3;netstandard2.0;net452;net461;uap10.0</TargetFrameworks>
|
||||||
<AssemblyName>MQTTnet</AssemblyName>
|
<AssemblyName>MQTTnet</AssemblyName>
|
||||||
<RootNamespace>MQTTnet</RootNamespace>
|
<RootNamespace>MQTTnet</RootNamespace>
|
||||||
<AssemblyVersion>2.5.0.0</AssemblyVersion>
|
<AssemblyVersion>2.5.0.0</AssemblyVersion>
|
||||||
@@ -68,4 +68,10 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.2" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)'=='net461'">
|
||||||
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Options" Version="2.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
-19
@@ -35,8 +35,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.TestApp.AspNetCore2
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.AspNetCore", "Frameworks\MQTTnet.AspnetCore\MQTTnet.AspNetCore.csproj", "{F10C4060-F7EE-4A83-919F-FF723E72F94A}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.AspNetCore", "Frameworks\MQTTnet.AspnetCore\MQTTnet.AspNetCore.csproj", "{F10C4060-F7EE-4A83-919F-FF723E72F94A}"
|
||||||
EndProject
|
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
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -167,22 +165,6 @@ Global
|
|||||||
{F10C4060-F7EE-4A83-919F-FF723E72F94A}.Release|x64.Build.0 = Release|Any CPU
|
{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.ActiveCfg = Release|Any CPU
|
||||||
{F10C4060-F7EE-4A83-919F-FF723E72F94A}.Release|x86.Build.0 = 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
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -194,7 +176,6 @@ Global
|
|||||||
{3D283AAD-AAA8-4339-8394-52F80B6304DB} = {9248C2E1-B9D6-40BF-81EC-86004D7765B4}
|
{3D283AAD-AAA8-4339-8394-52F80B6304DB} = {9248C2E1-B9D6-40BF-81EC-86004D7765B4}
|
||||||
{C6FF8AEA-0855-41EC-A1F3-AC262225BAB9} = {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}
|
{F10C4060-F7EE-4A83-919F-FF723E72F94A} = {32A630A7-2598-41D7-B625-204CD906F5FB}
|
||||||
{21AD2970-A8C7-4689-A35B-88082AFDABF8} = {9248C2E1-B9D6-40BF-81EC-86004D7765B4}
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {07536672-5CBC-4BE3-ACE0-708A431A7894}
|
SolutionGuid = {07536672-5CBC-4BE3-ACE0-708A431A7894}
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<TargetFrameworks>netcoreapp2.0;net452;net461</TargetFrameworks>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="MQTTnet" Version="2.5.2" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace MQTTnet.Test.NugetConsumption
|
|
||||||
{
|
|
||||||
class Program
|
|
||||||
{
|
|
||||||
static void Main(string[] args)
|
|
||||||
{
|
|
||||||
var server = new MqttFactory().CreateMqttServer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<configuration>
|
|
||||||
<!--
|
|
||||||
Used to specify the default Sources for list, install and update.
|
|
||||||
See: nuget.exe help list
|
|
||||||
See: nuget.exe help install
|
|
||||||
See: nuget.exe help update
|
|
||||||
-->
|
|
||||||
<packageSources>
|
|
||||||
<add key="NuGet official package source" value="https://nuget.org/api/v2/" />
|
|
||||||
<add key="local" value="/../../Build/NuGet" />
|
|
||||||
</packageSources>
|
|
||||||
|
|
||||||
<!-- Used to disable package sources -->
|
|
||||||
<disabledPackageSources />
|
|
||||||
</configuration>
|
|
||||||
Reference in New Issue
Block a user