diff --git a/.gitignore b/.gitignore index b9545fe69a..0e10f4aa54 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ nuget.exe .build/ autobahnreports/ .vscode/ +global.json diff --git a/build/dependencies.props b/build/dependencies.props index ecbe769d13..59dbe299f5 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -5,6 +5,7 @@ 1.0.0-* 4.3.0 1.6.1 + 2.0.0-* 15.0.0 2.2.0 diff --git a/samples/EchoApp/EchoApp.csproj b/samples/EchoApp/EchoApp.csproj index 0424007902..0aac572423 100644 --- a/samples/EchoApp/EchoApp.csproj +++ b/samples/EchoApp/EchoApp.csproj @@ -3,7 +3,7 @@ - netcoreapp1.1 + netcoreapp2.0 diff --git a/src/Microsoft.AspNetCore.WebSockets/Internal/fx/CompatHelpers.cs b/src/Microsoft.AspNetCore.WebSockets/Internal/fx/CompatHelpers.cs index 53dc09608f..420f3e7503 100644 --- a/src/Microsoft.AspNetCore.WebSockets/Internal/fx/CompatHelpers.cs +++ b/src/Microsoft.AspNetCore.WebSockets/Internal/fx/CompatHelpers.cs @@ -16,31 +16,17 @@ namespace System.Net.WebSockets public static Task FromException(Exception ex) { -#if NET451 - return FromException(ex); -#else return Task.FromException(ex); -#endif } public static Task FromException(Exception ex) { -#if NET451 - var tcs = new TaskCompletionSource(); - tcs.SetException(ex); - return tcs.Task; -#else return Task.FromException(ex); -#endif } internal static T[] Empty() { -#if NET451 - return new T[0]; -#else return Array.Empty(); -#endif } } diff --git a/src/Microsoft.AspNetCore.WebSockets/Microsoft.AspNetCore.WebSockets.csproj b/src/Microsoft.AspNetCore.WebSockets/Microsoft.AspNetCore.WebSockets.csproj index 953fb4d119..5a852d8c73 100644 --- a/src/Microsoft.AspNetCore.WebSockets/Microsoft.AspNetCore.WebSockets.csproj +++ b/src/Microsoft.AspNetCore.WebSockets/Microsoft.AspNetCore.WebSockets.csproj @@ -4,7 +4,7 @@ ASP.NET Core web socket middleware for use on top of opaque servers. - net451;netstandard1.3 + netstandard1.3 $(NoWarn);CS1591 true true diff --git a/test/AutobahnTestApp/AutobahnTestApp.csproj b/test/AutobahnTestApp/AutobahnTestApp.csproj index 56d7f09dcd..cec11d3850 100644 --- a/test/AutobahnTestApp/AutobahnTestApp.csproj +++ b/test/AutobahnTestApp/AutobahnTestApp.csproj @@ -3,7 +3,7 @@ - netcoreapp1.1 + netcoreapp2.0 diff --git a/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Autobahn/AutobahnTester.cs b/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Autobahn/AutobahnTester.cs index 66e1781241..52e53b11a1 100644 --- a/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Autobahn/AutobahnTester.cs +++ b/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Autobahn/AutobahnTester.cs @@ -100,7 +100,7 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn { ApplicationBaseUriHint = baseUrl, ApplicationType = ApplicationType.Portable, - TargetFramework = "netcoreapp1.1", + TargetFramework = "netcoreapp2.0", EnvironmentName = environment, SiteName = "HttpTestSite", // This is configured in the Http.config ServerConfigTemplateContent = (server == ServerType.IISExpress) ? File.ReadAllText(configPath) : null, @@ -111,10 +111,6 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn _deployers.Add(deployer); cancellationToken.ThrowIfCancellationRequested(); -#if NET451 - System.Net.ServicePointManager.ServerCertificateValidationCallback = (_, __, ___, ____) => true; - var client = new HttpClient(); -#else var handler = new HttpClientHandler(); if (ssl) { @@ -124,7 +120,6 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn handler.ServerCertificateCustomValidationCallback = (_, __, ___, ____) => true; } var client = new HttpClient(handler); -#endif // Make sure the server works var resp = await RetryHelper.RetryRequest(() => diff --git a/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Microsoft.AspNetCore.WebSockets.ConformanceTest.csproj b/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Microsoft.AspNetCore.WebSockets.ConformanceTest.csproj index 58708a55fa..e70d57c968 100644 --- a/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Microsoft.AspNetCore.WebSockets.ConformanceTest.csproj +++ b/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Microsoft.AspNetCore.WebSockets.ConformanceTest.csproj @@ -3,7 +3,7 @@ - netcoreapp1.1 + netcoreapp2.0 diff --git a/test/Microsoft.AspNetCore.WebSockets.Test/Microsoft.AspNetCore.WebSockets.Test.csproj b/test/Microsoft.AspNetCore.WebSockets.Test/Microsoft.AspNetCore.WebSockets.Test.csproj index 72c7be4d12..670e5c1427 100644 --- a/test/Microsoft.AspNetCore.WebSockets.Test/Microsoft.AspNetCore.WebSockets.Test.csproj +++ b/test/Microsoft.AspNetCore.WebSockets.Test/Microsoft.AspNetCore.WebSockets.Test.csproj @@ -3,9 +3,9 @@ - net452;netcoreapp1.1 - netcoreapp1.1 - x64 + net46;netcoreapp2.0 + netcoreapp2.0 + x64 @@ -16,12 +16,9 @@ + - - - -