Преглед на файлове

added net461 build

release/3.x.x
JanEggers преди 7 години
родител
ревизия
bdadfa1c26
променени са 7 файла, в които са добавени 25 реда и са изтрити 24 реда
  1. +9
    -0
      Build/MQTTnet.nuspec
  2. +1
    -0
      Build/build.ps1
  3. +3
    -3
      Frameworks/MQTTnet.NetStandard/Implementations/MqttServerAdapter.cs
  4. +4
    -4
      Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.cs
  5. +7
    -1
      Frameworks/MQTTnet.NetStandard/MQTTnet.Netstandard.csproj
  6. +1
    -1
      Tests/MQTTnet.Test.NugetConsumption/MQTTnet.Test.NugetConsumption.csproj
  7. +0
    -15
      Tests/MQTTnet.Test.NugetConsumption/nuget.config

+ 9
- 0
Build/MQTTnet.nuspec Целия файл

@@ -52,6 +52,12 @@
<dependency id="Microsoft.Extensions.Options" version="1.0.2" />
</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>
</metadata>

@@ -71,6 +77,9 @@
<!-- .NET Framework -->
<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\net461\MQTTnet.Core.*" target="lib\net461\"/>
<file src="..\Frameworks\MQTTnet.Netstandard\bin\Release\net461\MQTTnet.*" target="lib\net461\"/>
</files>
</package>

+ 1
- 0
Build/build.ps1 Целия файл

@@ -9,6 +9,7 @@ if ($path) {
$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="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="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


+ 3
- 3
Frameworks/MQTTnet.NetStandard/Implementations/MqttServerAdapter.cs Целия файл

@@ -1,4 +1,4 @@
#if NET452 || NETSTANDARD1_3 || NETSTANDARD2_0
#if NET452 || NET461 || NETSTANDARD1_3 || NETSTANDARD2_0
using System;
using System.Net;
using System.Net.Security;
@@ -98,7 +98,7 @@ namespace MQTTnet.Implementations
try
{
//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);
#else
var clientSocket = await _defaultEndpointSocket.AcceptAsync().ConfigureAwait(false);
@@ -122,7 +122,7 @@ namespace MQTTnet.Implementations
{
try
{
#if NET452
#if NET452 || NET461
var clientSocket = await Task.Factory.FromAsync(_tlsEndpointSocket.BeginAccept, _tlsEndpointSocket.EndAccept, null).ConfigureAwait(false);
#else
var clientSocket = await _tlsEndpointSocket.AcceptAsync().ConfigureAwait(false);


+ 4
- 4
Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.cs Целия файл

@@ -1,4 +1,4 @@
#if NET452 || NETSTANDARD1_3 || NETSTANDARD2_0
#if NET452 || NET461 || NETSTANDARD1_3 || NETSTANDARD2_0
using System;
using System.Net.Security;
using System.Net.Sockets;
@@ -17,7 +17,7 @@ namespace MQTTnet.Implementations
private readonly MqttClientTcpOptions _options;

//todo: this can be used with min dependency NetStandard1.6
#if NET452
#if NET452 || NET461
// ReSharper disable once MemberCanBePrivate.Global
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global
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
#if NET452
#if NET452 || NET461
await Task.Factory.FromAsync(_socket.BeginConnect, _socket.EndConnect, _options.Server, _options.GetPort(), null).ConfigureAwait(false);
#else
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

//todo: if branch can be used with min dependency NetStandard1.6
#if NET452
#if NET452 || NET461
SendStream = new BufferedStream(stream, BufferSize);
ReceiveStream = new BufferedStream(stream, BufferSize);
#else


+ 7
- 1
Frameworks/MQTTnet.NetStandard/MQTTnet.Netstandard.csproj Целия файл

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.3;netstandard2.0;net452;uap10.0</TargetFrameworks>
<TargetFrameworks>netstandard1.3;netstandard2.0;net452;net461;uap10.0</TargetFrameworks>
<AssemblyName>MQTTnet</AssemblyName>
<RootNamespace>MQTTnet</RootNamespace>
<AssemblyVersion>2.5.0.0</AssemblyVersion>
@@ -68,4 +68,10 @@
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.2" />
</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>

+ 1
- 1
Tests/MQTTnet.Test.NugetConsumption/MQTTnet.Test.NugetConsumption.csproj Целия файл

@@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MQTTnet" Version="2.5.2" />
<PackageReference Include="MQTTnet" Version="0.0.1" />
</ItemGroup>

</Project>

+ 0
- 15
Tests/MQTTnet.Test.NugetConsumption/nuget.config Целия файл

@@ -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>

Зареждане…
Отказ
Запис