.Net5.0 TFMs addedrelease/3.x.x
@@ -40,7 +40,7 @@ namespace MQTTnet.AspNetCore.Client.Tcp | |||||
_sender = new SocketSender(_socket, PipeScheduler.ThreadPool); | _sender = new SocketSender(_socket, PipeScheduler.ThreadPool); | ||||
_receiver = new SocketReceiver(_socket, PipeScheduler.ThreadPool); | _receiver = new SocketReceiver(_socket, PipeScheduler.ThreadPool); | ||||
} | } | ||||
#if NETCOREAPP3_1 | |||||
#if NETCOREAPP3_1 || NET5_0 | |||||
public override ValueTask DisposeAsync() | public override ValueTask DisposeAsync() | ||||
#else | #else | ||||
public Task DisposeAsync() | public Task DisposeAsync() | ||||
@@ -53,7 +53,7 @@ namespace MQTTnet.AspNetCore.Client.Tcp | |||||
_socket?.Dispose(); | _socket?.Dispose(); | ||||
#if NETCOREAPP3_1 | |||||
#if NETCOREAPP3_1 || NET5_0 | |||||
return base.DisposeAsync(); | return base.DisposeAsync(); | ||||
} | } | ||||
@@ -12,6 +12,7 @@ namespace MQTTnet.AspNetCore.Extensions | |||||
#if NETCOREAPP3_1 | #if NETCOREAPP3_1 | ||||
[Obsolete("This class is obsolete and will be removed in a future version. The recommended alternative is to use MapMqtt inside Microsoft.AspNetCore.Builder.UseEndpoints(...).")] | [Obsolete("This class is obsolete and will be removed in a future version. The recommended alternative is to use MapMqtt inside Microsoft.AspNetCore.Builder.UseEndpoints(...).")] | ||||
#endif | #endif | ||||
#if NETCOREAPP3_1 || NETCOREAPP2_1 || NETSTANDARD | |||||
public static void MapMqtt(this ConnectionsRouteBuilder connection, PathString path) | public static void MapMqtt(this ConnectionsRouteBuilder connection, PathString path) | ||||
{ | { | ||||
connection.MapConnectionHandler<MqttConnectionHandler>(path, options => | connection.MapConnectionHandler<MqttConnectionHandler>(path, options => | ||||
@@ -19,5 +20,6 @@ namespace MQTTnet.AspNetCore.Extensions | |||||
options.WebSockets.SubProtocolSelector = MqttSubProtocolSelector.SelectSubProtocol; | options.WebSockets.SubProtocolSelector = MqttSubProtocolSelector.SelectSubProtocol; | ||||
}); | }); | ||||
} | } | ||||
#endif | |||||
} | } | ||||
} | } |
@@ -1,5 +1,5 @@ | |||||
| | ||||
#if NETCOREAPP3_1 | |||||
#if NETCOREAPP3_1 || NET5_0 | |||||
using Microsoft.AspNetCore.Builder; | using Microsoft.AspNetCore.Builder; | ||||
using Microsoft.AspNetCore.Routing; | using Microsoft.AspNetCore.Routing; | ||||
@@ -1,7 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFrameworks>netstandard2.0;netcoreapp2.1;netcoreapp3.1</TargetFrameworks> | |||||
<TargetFrameworks>netstandard2.0;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks> | |||||
<Product /> | <Product /> | ||||
<Company /> | <Company /> | ||||
<Authors /> | <Authors /> | ||||
@@ -21,11 +21,11 @@ | |||||
<DefineConstants>RELEASE;NETSTANDARD2_0</DefineConstants> | <DefineConstants>RELEASE;NETSTANDARD2_0</DefineConstants> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'"> | |||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0' "> | |||||
<FrameworkReference Include="Microsoft.AspNetCore.App" /> | <FrameworkReference Include="Microsoft.AspNetCore.App" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'"> | |||||
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1' and '$(TargetFramework)' != 'net5.0' "> | |||||
<PackageReference Include="Microsoft.AspNetCore.Http.Connections" Version="1.1.0" /> | <PackageReference Include="Microsoft.AspNetCore.Http.Connections" Version="1.1.0" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -1,7 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFrameworks>netstandard1.3;netstandard2.0;netstandard2.1</TargetFrameworks> | |||||
<TargetFrameworks>netstandard1.3;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks> | |||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net452;net461</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net452;net461</TargetFrameworks> | ||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' AND '$(SolutionName)' != 'MQTTnet.noUWP' ">$(TargetFrameworks);uap10.0</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' AND '$(SolutionName)' != 'MQTTnet.noUWP' ">$(TargetFrameworks);uap10.0</TargetFrameworks> | ||||
<Product /> | <Product /> | ||||
@@ -1,7 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFrameworks>netstandard1.3;netstandard2.0;netstandard2.1</TargetFrameworks> | |||||
<TargetFrameworks>netstandard1.3;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks> | |||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net452;net461</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net452;net461</TargetFrameworks> | ||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' AND '$(SolutionName)' != 'MQTTnet.noUWP' ">$(TargetFrameworks);uap10.0</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' AND '$(SolutionName)' != 'MQTTnet.noUWP' ">$(TargetFrameworks);uap10.0</TargetFrameworks> | ||||
<Product /> | <Product /> | ||||
@@ -1,7 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFrameworks>netstandard1.3;netstandard2.0;netstandard2.1</TargetFrameworks> | |||||
<TargetFrameworks>netstandard1.3;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks> | |||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net452;net461</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net452;net461</TargetFrameworks> | ||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' AND '$(SolutionName)' != 'MQTTnet.noUWP' ">$(TargetFrameworks);uap10.0</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' AND '$(SolutionName)' != 'MQTTnet.noUWP' ">$(TargetFrameworks);uap10.0</TargetFrameworks> | ||||
<Product /> | <Product /> | ||||
@@ -1,7 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk.Web"> | <Project Sdk="Microsoft.NET.Sdk.Web"> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFramework>netcoreapp3.1</TargetFramework> | |||||
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks> | |||||
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> | <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> | ||||
<AssemblyName>MQTTnet.Server</AssemblyName> | <AssemblyName>MQTTnet.Server</AssemblyName> | ||||
<RootNamespace>MQTTnet.Server</RootNamespace> | <RootNamespace>MQTTnet.Server</RootNamespace> | ||||
@@ -41,11 +41,18 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="IronPython" Version="2.7.11" /> | <PackageReference Include="IronPython" Version="2.7.11" /> | ||||
<PackageReference Include="IronPython.StdLib" Version="2.7.11" /> | <PackageReference Include="IronPython.StdLib" Version="2.7.11" /> | ||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.5" /> | |||||
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" /> | <PackageReference Include="MSTest.TestAdapter" Version="2.1.2" /> | ||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="5.6.3" /> | <PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="5.6.3" /> | ||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.6.3" /> | <PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.6.3" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup Condition="'$(TargetFramework)' != 'net5.0'"> | |||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.5" /> | |||||
</ItemGroup> | |||||
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'"> | |||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\MQTTnet.AspnetCore\MQTTnet.AspNetCore.csproj" /> | <ProjectReference Include="..\MQTTnet.AspnetCore\MQTTnet.AspNetCore.csproj" /> | ||||
@@ -22,6 +22,8 @@ | |||||
return "uap10.0"; | return "uap10.0"; | ||||
#elif NETCOREAPP3_1 | #elif NETCOREAPP3_1 | ||||
return "netcoreapp3.1"; | return "netcoreapp3.1"; | ||||
#elif NET5_0 | |||||
return "net5.0"; | |||||
#endif | #endif | ||||
} | } | ||||
} | } | ||||
@@ -1,7 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFrameworks>netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1</TargetFrameworks> | |||||
<TargetFrameworks>netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0</TargetFrameworks> | |||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net452;net461</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net452;net461</TargetFrameworks> | ||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' AND '$(SolutionName)' != 'MQTTnet.noUWP' ">$(TargetFrameworks);uap10.0</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' AND '$(SolutionName)' != 'MQTTnet.noUWP' ">$(TargetFrameworks);uap10.0</TargetFrameworks> | ||||
<AssemblyName>MQTTnet</AssemblyName> | <AssemblyName>MQTTnet</AssemblyName> | ||||
@@ -1,7 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks> | |||||
<TargetFrameworks>netcoreapp3.1;net461;net5.0</TargetFrameworks> | |||||
<IsPackable>false</IsPackable> | <IsPackable>false</IsPackable> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
@@ -3,16 +3,23 @@ | |||||
<PropertyGroup> | <PropertyGroup> | ||||
<OutputType>Exe</OutputType> | <OutputType>Exe</OutputType> | ||||
<DebugType>Full</DebugType> | <DebugType>Full</DebugType> | ||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net461;netcoreapp2.1</TargetFrameworks> | |||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net461;netcoreapp2.1;net5.0</TargetFrameworks> | |||||
<TargetFramework Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.1</TargetFramework> | <TargetFramework Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.1</TargetFramework> | ||||
<LangVersion>7.2</LangVersion> | <LangVersion>7.2</LangVersion> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" /> | <PackageReference Include="BenchmarkDotNet" Version="0.12.1" /> | ||||
<PackageReference Include="System.IO.Pipelines" Version="4.7.2" /> | |||||
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" /> | <PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup Condition="'$(TargetFramework)' != 'net5.0'"> | |||||
<PackageReference Include="System.IO.Pipelines" Version="4.7.2" /> | |||||
</ItemGroup> | |||||
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'"> | |||||
<PackageReference Include="System.IO.Pipelines" Version="5.0.0" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\Source\MQTTnet.AspnetCore\MQTTnet.AspNetCore.csproj" /> | <ProjectReference Include="..\..\Source\MQTTnet.AspnetCore\MQTTnet.AspNetCore.csproj" /> | ||||
@@ -1,7 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks> | |||||
<TargetFrameworks>netcoreapp3.1;net461;net5.0</TargetFrameworks> | |||||
<IsPackable>false</IsPackable> | <IsPackable>false</IsPackable> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
@@ -1,7 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk.Web"> | <Project Sdk="Microsoft.NET.Sdk.Web"> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFrameworks>net461;netcoreapp2.1;netcoreapp3.1</TargetFrameworks> | |||||
<TargetFrameworks>net461;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks> | |||||
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion> | <TypeScriptToolsVersion>Latest</TypeScriptToolsVersion> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
@@ -27,7 +27,7 @@ namespace MQTTnet.TestApp.AspNetCore2 | |||||
} | } | ||||
// In class _Startup_ of the ASP.NET Core 3.1 project. | // In class _Startup_ of the ASP.NET Core 3.1 project. | ||||
#if NETCOREAPP3_1 | |||||
#if NETCOREAPP3_1 || NET5_0 | |||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | ||||
{ | { | ||||
app.UseRouting(); | app.UseRouting(); | ||||
@@ -3,7 +3,7 @@ | |||||
<PropertyGroup> | <PropertyGroup> | ||||
<OutputType>Exe</OutputType> | <OutputType>Exe</OutputType> | ||||
<DebugType>Full</DebugType> | <DebugType>Full</DebugType> | ||||
<TargetFrameworks>netcoreapp2.1</TargetFrameworks> | |||||
<TargetFrameworks>netcoreapp2.1;net5.0</TargetFrameworks> | |||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net452;net461</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net452;net461</TargetFrameworks> | ||||
</PropertyGroup> | </PropertyGroup> | ||||