Upgrade to netcoreapp2.2 and remove netcoreapp2.0 testing (#2221)

This commit is contained in:
BrennanConroy 2018-05-09 09:59:02 -07:00 committed by GitHub
parent 62d892315b
commit f09b0e13d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 44 additions and 47 deletions

View File

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">$(MicrosoftNETCoreApp20PackageVersion)</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">$(MicrosoftNETCoreApp21PackageVersion)</RuntimeFrameworkVersion>
<NETStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.0' ">$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">$(MicrosoftNETCoreApp22PackageVersion)</RuntimeFrameworkVersion>
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
</PropertyGroup>
</Project>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<!-- SignalR is versioned 1.0 alongside the 2.1 version of AspNetCore.All, this converts the .All version to the SignalR version -->
<MessagePackPackageVersion Condition=" '$(BenchmarksTargetFramework)' != '' ">$([System.String]::Copy($(MicrosoftAspNetCoreAllPackageVersion)).Replace('2.2', '1.1'))</MessagePackPackageVersion>
</PropertyGroup>

View File

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>Microsoft.AspNetCore.SignalR.CranksRevenge</RootNamespace>
</PropertyGroup>

View File

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@ -55,8 +55,7 @@
<MicrosoftExtensionsSecurityHelperSourcesPackageVersion>2.2.0-preview1-34135</MicrosoftExtensionsSecurityHelperSourcesPackageVersion>
<MicrosoftExtensionsValueStopwatchSourcesPackageVersion>2.2.0-preview1-34135</MicrosoftExtensionsValueStopwatchSourcesPackageVersion>
<MicrosoftExtensionsWebEncodersSourcesPackageVersion>2.2.0-preview1-34135</MicrosoftExtensionsWebEncodersSourcesPackageVersion>
<MicrosoftNETCoreApp20PackageVersion>2.0.0</MicrosoftNETCoreApp20PackageVersion>
<MicrosoftNETCoreApp21PackageVersion>2.2.0-preview1-26424-04</MicrosoftNETCoreApp21PackageVersion>
<MicrosoftNETCoreApp22PackageVersion>2.2.0-preview1-26502-01</MicrosoftNETCoreApp22PackageVersion>
<MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>
<MoqPackageVersion>4.7.49</MoqPackageVersion>
<NETStandardLibrary20PackageVersion>2.0.3</NETStandardLibrary20PackageVersion>

View File

@ -19,7 +19,6 @@
</PropertyGroup>
<ItemGroup>
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp22PackageVersion)" />
</ItemGroup>
</Project>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
</PropertyGroup>

View File

@ -100,7 +100,7 @@ if (chromePath) {
(async () => {
try {
const serverPath = path.resolve(__dirname, "..", "bin", configuration, "netcoreapp2.1", "FunctionalTests.dll");
const serverPath = path.resolve(__dirname, "..", "bin", configuration, "netcoreapp2.2", "FunctionalTests.dll");
debug(`Launching Functional Test Server: ${serverPath}`);
const dotnet = spawn("dotnet", [serverPath], {

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
<TargetFrameworks>netcoreapp2.2;net461</TargetFrameworks>
<!-- Don't create a NuGet package -->
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>

View File

@ -22,7 +22,7 @@ namespace ClientSample
public SocketAwaitable ReceiveAsync(Memory<byte> buffer)
{
#if NETCOREAPP2_1
#if NETCOREAPP2_2
_eventArgs.SetBuffer(buffer);
#else
var segment = buffer.GetArray();

View File

@ -32,7 +32,7 @@ namespace ClientSample
return SendAsync(buffers.First);
}
#if NETCOREAPP2_1
#if NETCOREAPP2_2
if (!_eventArgs.MemoryBuffer.Equals(Memory<byte>.Empty))
#else
if (_eventArgs.Buffer != null)
@ -59,7 +59,7 @@ namespace ClientSample
_eventArgs.BufferList = null;
}
#if NETCOREAPP2_1
#if NETCOREAPP2_2
_eventArgs.SetBuffer(MemoryMarshal.AsMemory(memory));
#else
var segment = memory.GetArray();

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
<TargetFrameworks>netcoreapp2.2;net461</TargetFrameworks>
<!-- Don't create a NuGet package -->
<IsPackable>false</IsPackable>
</PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
<TargetFrameworks>netcoreapp2.2;net461</TargetFrameworks>
<!-- Don't create a NuGet package -->
<IsPackable>false</IsPackable>
</PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
<TargetFrameworks>netcoreapp2.2;net461</TargetFrameworks>
<OutputType>Exe</OutputType>
<!-- Don't create a NuGet package -->
<IsPackable>false</IsPackable>

View File

@ -185,7 +185,7 @@ namespace Microsoft.AspNetCore.Internal
{
if (_completedSegments != null)
{
// Copy full segments
// Copy full segments
var count = _completedSegments.Count;
for (var i = 0; i < count; i++)
{
@ -293,7 +293,7 @@ namespace Microsoft.AspNetCore.Internal
}
}
#if NETCOREAPP2_1
#if NETCOREAPP2_2
public override void Write(ReadOnlySpan<byte> span)
{
if (_currentSegment != null && span.TryCopyTo(_currentSegment.AsSpan(_position)))

View File

@ -60,7 +60,7 @@ namespace System.IO.Pipelines
return WriteCoreAsync(buffer.AsMemory(offset, count), cancellationToken).AsTask();
}
#if NETCOREAPP2_1
#if NETCOREAPP2_2
public override ValueTask WriteAsync(ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default)
{
return WriteCoreAsync(source, cancellationToken);

View File

@ -15,7 +15,7 @@ namespace System.IO
{
if (buffer.IsSingleSegment)
{
#if NETCOREAPP2_1
#if NETCOREAPP2_2
return stream.WriteAsync(buffer.First, cancellationToken);
#else
var isArray = MemoryMarshal.TryGetArray(buffer.First, out var arraySegment);
@ -33,7 +33,7 @@ namespace System.IO
var position = buffer.Start;
while (buffer.TryGet(ref position, out var segment))
{
#if NETCOREAPP2_1
#if NETCOREAPP2_2
await stream.WriteAsync(segment, cancellationToken);
#else
var isArray = MemoryMarshal.TryGetArray(segment, out var arraySegment);

View File

@ -72,7 +72,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal
var source = _utf8Buffer.First.Span;
var bytesUsed = 0;
var charsUsed = 0;
#if NETCOREAPP2_1
#if NETCOREAPP2_2
var destination = new Span<char>(buffer, index, count);
_decoder.Convert(source, destination, false, out bytesUsed, out charsUsed, out var completed);
#else

View File

@ -111,7 +111,7 @@ namespace Microsoft.AspNetCore.Internal
// this should be an exceptional case
var bytesUsed = 0;
var charsUsed = 0;
#if NETCOREAPP2_1
#if NETCOREAPP2_2
_encoder.Convert(new Span<char>(&value, 1), destination, false, out charsUsed, out bytesUsed, out _);
#else
fixed (byte* destinationBytes = &MemoryMarshal.GetReference(destination))
@ -167,7 +167,7 @@ namespace Microsoft.AspNetCore.Internal
var bytesUsed = 0;
var charsUsed = 0;
#if NETCOREAPP2_1
#if NETCOREAPP2_2
_encoder.Convert(buffer, destination, false, out charsUsed, out bytesUsed, out _);
#else
unsafe

View File

@ -13,7 +13,7 @@ namespace System.Net.WebSockets
{
public static ValueTask SendAsync(this WebSocket webSocket, ReadOnlySequence<byte> buffer, WebSocketMessageType webSocketMessageType, CancellationToken cancellationToken = default)
{
#if NETCOREAPP2_1
#if NETCOREAPP2_2
if (buffer.IsSingleSegment)
{
return webSocket.SendAsync(buffer.First, webSocketMessageType, endOfMessage: true, cancellationToken);
@ -41,7 +41,7 @@ namespace System.Net.WebSockets
var position = buffer.Start;
while (buffer.TryGet(ref position, out var segment))
{
#if NETCOREAPP2_1
#if NETCOREAPP2_2
await webSocket.SendAsync(segment, webSocketMessageType, endOfMessage: false, cancellationToken);
#else
var isArray = MemoryMarshal.TryGetArray(segment, out var arraySegment);
@ -51,7 +51,7 @@ namespace System.Net.WebSockets
}
// Empty end of message frame
#if NETCOREAPP2_1
#if NETCOREAPP2_2
await webSocket.SendAsync(Memory<byte>.Empty, webSocketMessageType, endOfMessage: true, cancellationToken);
#else
await webSocket.SendAsync(new ArraySegment<byte>(Array.Empty<byte>()), webSocketMessageType, endOfMessage: true, cancellationToken);

View File

@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client
private static readonly Task<string> _noAccessToken = Task.FromResult<string>(null);
private static readonly TimeSpan HttpClientTimeout = TimeSpan.FromSeconds(120);
#if !NETCOREAPP2_1
#if !NETCOREAPP2_2
private static readonly Version Windows8Version = new Version(6, 2);
#endif
@ -557,7 +557,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client
private static bool IsWebSocketsSupported()
{
#if NETCOREAPP2_1
#if NETCOREAPP2_2
// .NET Core 2.1 and above has a managed implementation
return true;
#else

View File

@ -194,7 +194,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal
{
while (true)
{
#if NETCOREAPP2_1
#if NETCOREAPP2_2
var result = await socket.ReceiveAsync(Memory<byte>.Empty, CancellationToken.None);
if (result.MessageType == WebSocketMessageType.Close)
@ -210,7 +210,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal
}
#endif
var memory = _application.Output.GetMemory();
#if NETCOREAPP2_1
#if NETCOREAPP2_2
// Because we checked the CloseStatus from the 0 byte read above, we don't need to check again after reading
var receiveResult = await socket.ReceiveAsync(memory, CancellationToken.None);
#else
@ -220,7 +220,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal
// Exceptions are handled above where the send and receive tasks are being run.
var receiveResult = await socket.ReceiveAsync(arraySegment, CancellationToken.None);
#endif
// Need to check again for NetCoreApp2.1 because a close can happen between a 0-byte read and the actual read
// Need to check again for NetCoreApp2.2 because a close can happen between a 0-byte read and the actual read
if (receiveResult.MessageType == WebSocketMessageType.Close)
{
Log.WebSocketClosed(_logger, _webSocket.CloseStatus);

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Client for ASP.NET Core Connection Handlers</Description>
<TargetFrameworks>netstandard2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netcoreapp2.2</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

View File

@ -142,7 +142,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports
{
while (true)
{
#if NETCOREAPP2_1
#if NETCOREAPP2_2
// Do a 0 byte read so that idle connections don't allocate a buffer when waiting for a read
var result = await socket.ReceiveAsync(Memory<byte>.Empty, CancellationToken.None);
@ -153,7 +153,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports
#endif
var memory = _application.Output.GetMemory();
#if NETCOREAPP2_1
#if NETCOREAPP2_2
var receiveResult = await socket.ReceiveAsync(memory, CancellationToken.None);
#else
var isArray = MemoryMarshal.TryGetArray<byte>(memory, out var arraySegment);
@ -162,7 +162,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports
// Exceptions are handled above where the send and receive tasks are being run.
var receiveResult = await socket.ReceiveAsync(arraySegment, CancellationToken.None);
#endif
// Need to check again for NetCoreApp2.1 because a close can happen between a 0-byte read and the actual read
// Need to check again for NetCoreApp2.2 because a close can happen between a 0-byte read and the actual read
if (receiveResult.MessageType == WebSocketMessageType.Close)
{
return;

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Components for providing real-time bi-directional communication across the Web.</Description>
<TargetFrameworks>netstandard2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netcoreapp2.2</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Common serialiation primitives for SignalR Clients Servers</Description>
<TargetFrameworks>netstandard2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netcoreapp2.2</TargetFrameworks>
<RootNamespace>Microsoft.AspNetCore.SignalR</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

View File

@ -2,9 +2,8 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<DeveloperBuildTestTfms>netcoreapp2.1</DeveloperBuildTestTfms>
<DeveloperBuildTestTfms>netcoreapp2.2</DeveloperBuildTestTfms>
<StandardTestTfms>$(DeveloperBuildTestTfms)</StandardTestTfms>
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' ">netcoreapp2.1;netcoreapp2.0</StandardTestTfms>
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' ">$(StandardTestTfms);net461</StandardTestTfms>
<RuntimeIdentifier Condition="'$(TargetFramework)' == 'net461'">win7-x86</RuntimeIdentifier>
</PropertyGroup>

View File

@ -358,7 +358,7 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol
}
}
#if NETCOREAPP2_1
#if NETCOREAPP2_2
[Fact]
public void WriteSpanWorksAtNonZeroOffset()
{

View File

@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
{
public static bool IsWebSocketsSupported()
{
#if NETCOREAPP2_1
#if NETCOREAPP2_2
// .NET Core 2.1 and greater has sockets
return true;
#else