| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- commit 58fb4f322e78330d0d8ac3b5b0d86763ca0ecc70
- Author: Pranav K <[email protected]>
- Date: Tue Nov 14 10:07:10 2017 -0800
- Update samples and tests to target netcoreapp2.1
- diff --git a/Directory.Build.props b/Directory.Build.props
- index a4d5ebdcd06..36f05acd3be 100644
- --- a/Directory.Build.props
- +++ b/Directory.Build.props
- @@ -1,4 +1,8 @@
- <Project>
- + <Import
- + Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))\AspNetCoreSettings.props"
- + Condition=" '$(CI)' != 'true' AND '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))' != '' " />
- +
- <Import Project="version.props" />
- <Import Project="build\dependencies.props" />
-
- diff --git a/korebuild-lock.txt b/korebuild-lock.txt
- index 45463cc71ec..95f46130145 100644
- --- a/korebuild-lock.txt
- +++ b/korebuild-lock.txt
- @@ -1,2 +1,2 @@
- -version:2.1.0-preview1-15549
- -commithash:f570e08585fec510dd60cd4bfe8795388b757a95
- +version:2.1.0-preview1-15567
- +commithash:903e3104807b1bb8cddd28bdef205b1e2dc021d1
- diff --git a/samples/HotAddSample/HotAddSample.csproj b/samples/HotAddSample/HotAddSample.csproj
- index 49d0e734635..caf6da74fed 100644
- --- a/samples/HotAddSample/HotAddSample.csproj
- +++ b/samples/HotAddSample/HotAddSample.csproj
- @@ -1,7 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- + <TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
- <OutputType>Exe</OutputType>
- <ServerGarbageCollection>true</ServerGarbageCollection>
- </PropertyGroup>
- diff --git a/samples/SelfHostServer/SelfHostServer.csproj b/samples/SelfHostServer/SelfHostServer.csproj
- index 49d0e734635..caf6da74fed 100644
- --- a/samples/SelfHostServer/SelfHostServer.csproj
- +++ b/samples/SelfHostServer/SelfHostServer.csproj
- @@ -1,7 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- + <TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
- <OutputType>Exe</OutputType>
- <ServerGarbageCollection>true</ServerGarbageCollection>
- </PropertyGroup>
- diff --git a/test/Directory.Build.props b/test/Directory.Build.props
- index c79812719aa..036af693c51 100644
- --- a/test/Directory.Build.props
- +++ b/test/Directory.Build.props
- @@ -1,6 +1,13 @@
- <Project>
- <Import Project="..\Directory.Build.props" />
-
- + <PropertyGroup>
- + <DeveloperBuildTestTfms>netcoreapp2.1</DeveloperBuildTestTfms>
- + <StandardTestTfms>$(DeveloperBuildTestTfms)</StandardTestTfms>
- + <StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' ">$(StandardTestTfms);netcoreapp2.0</StandardTestTfms>
- + <StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' ">$(StandardTestTfms);net461</StandardTestTfms>
- + </PropertyGroup>
- +
- <ItemGroup>
- <PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" />
- <PackageReference Include="Microsoft.AspNetCore.Testing" Version="$(MicrosoftAspNetCoreTestingPackageVersion)" />
- diff --git a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseBodyTests.cs b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseBodyTests.cs
- index 2ea7910a111..ef56e997cb4 100644
- --- a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseBodyTests.cs
- +++ b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseBodyTests.cs
- @@ -168,7 +168,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
- context = await server.AcceptAsync(Utilities.DefaultTimeout);
- context.Response.Headers["Content-lenGth"] = " 20 ";
- context.Dispose();
- -#elif NETCOREAPP2_0
- +#elif NETCOREAPP2_0 || NETCOREAPP2_1
- #else
- #error Target framework needs to be updated
- #endif
- @@ -330,7 +330,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
- writeTask = context.Response.Body.WriteAsync(new byte[10], 0, 10, cts.Token);
- Assert.True(writeTask.IsCanceled);
- context.Dispose();
- -#elif NETCOREAPP2_0
- +#elif NETCOREAPP2_0 || NETCOREAPP2_1
- #else
- #error Target framework needs to be updated
- #endif
- @@ -362,7 +362,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
- writeTask = context.Response.Body.WriteAsync(new byte[10], 0, 10, cts.Token);
- Assert.True(writeTask.IsCanceled);
- context.Dispose();
- -#elif NETCOREAPP2_0
- +#elif NETCOREAPP2_0 || NETCOREAPP2_1
- #else
- #error Target framework needs to be updated
- #endif
- diff --git a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseHeaderTests.cs b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseHeaderTests.cs
- index 86b377e7e33..727dd69ec68 100644
- --- a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseHeaderTests.cs
- +++ b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseHeaderTests.cs
- @@ -252,7 +252,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
- Assert.Equal(0, response.ContentLength);
- Assert.NotNull(response.Headers["Date"]);
- Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]);
- -#if NETCOREAPP2_0 // WebHeaderCollection.GetValues() not available in CoreCLR.
- +#if NETCOREAPP2_0 || NETCOREAPP2_1 // WebHeaderCollection.GetValues() not available in CoreCLR.
- Assert.Equal("custom1, and custom2, custom3", response.Headers["WWW-Authenticate"]);
- #elif NET461
- Assert.Equal(new string[] { "custom1, and custom2", "custom3" }, response.Headers.GetValues("WWW-Authenticate"));
- @@ -283,7 +283,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
- Assert.Equal(0, response.ContentLength);
- Assert.NotNull(response.Headers["Date"]);
- Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]);
- -#if NETCOREAPP2_0 // WebHeaderCollection.GetValues() not available in CoreCLR.
- +#if NETCOREAPP2_0 || NETCOREAPP2_1 // WebHeaderCollection.GetValues() not available in CoreCLR.
- Assert.Equal("custom1, and custom2, custom3", response.Headers["Custom-Header1"]);
- #elif NET461
- Assert.Equal(new string[] { "custom1, and custom2", "custom3" }, response.Headers.GetValues("Custom-Header1"));
- diff --git a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseSendFileTests.cs b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseSendFileTests.cs
- index f1c1f4ba263..2a962c69f2e 100644
- --- a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseSendFileTests.cs
- +++ b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ResponseSendFileTests.cs
- @@ -371,7 +371,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
- writeTask = context.Response.SendFileAsync(AbsoluteFilePath, 0, null, cts.Token);
- Assert.True(writeTask.IsCanceled);
- context.Dispose();
- -#elif NETCOREAPP2_0
- +#elif NETCOREAPP2_0 || NETCOREAPP2_1
- #else
- #error Target framework needs to be updated
- #endif
- @@ -403,7 +403,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
- writeTask = context.Response.SendFileAsync(AbsoluteFilePath, 0, null, cts.Token);
- Assert.True(writeTask.IsCanceled);
- context.Dispose();
- -#elif NETCOREAPP2_0
- +#elif NETCOREAPP2_0 || NETCOREAPP2_1
- #else
- #error Target framework needs to be updated
- #endif
- diff --git a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ServerTests.cs b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ServerTests.cs
- index e12488f13e8..60c95a94f1c 100644
- --- a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ServerTests.cs
- +++ b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/ServerTests.cs
- @@ -188,7 +188,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
- // HttpClient re-tries the request because it doesn't know if the request was received.
- context = await server.AcceptAsync(Utilities.DefaultTimeout);
- context.Abort();
- -#elif NETCOREAPP2_0
- +#elif NETCOREAPP2_0 || NETCOREAPP2_1
- #else
- #error Target framework needs to be updated
- #endif
- diff --git a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj
- index ed1c3689139..dd4dc97dbc4 100644
- --- a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj
- +++ b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
- </PropertyGroup>
-
- <ItemGroup>
- diff --git a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/ResponseHeaderTests.cs b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/ResponseHeaderTests.cs
- index bec341b50ff..ec93832e184 100644
- --- a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/ResponseHeaderTests.cs
- +++ b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/ResponseHeaderTests.cs
- @@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
- Assert.Equal(0, response.ContentLength);
- Assert.NotNull(response.Headers["Date"]);
- Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]);
- -#if NETCOREAPP2_0 // WebHeaderCollection.GetValues() not available in CoreCLR.
- +#if NETCOREAPP2_0 || NETCOREAPP2_1 // WebHeaderCollection.GetValues() not available in CoreCLR.
- Assert.Equal("custom1, and custom2, custom3", response.Headers["WWW-Authenticate"]);
- #elif NET461
- Assert.Equal(new string[] { "custom1, and custom2", "custom3" }, response.Headers.GetValues("WWW-Authenticate"));
- @@ -111,7 +111,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
- Assert.Equal(0, response.ContentLength);
- Assert.NotNull(response.Headers["Date"]);
- Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]);
- -#if NETCOREAPP2_0 // WebHeaderCollection.GetValues() not available in CoreCLR.
- +#if NETCOREAPP2_0 || NETCOREAPP2_1 // WebHeaderCollection.GetValues() not available in CoreCLR.
- Assert.Equal("custom1, and custom2, custom3", response.Headers["Custom-Header1"]);
- #elif NET461
- Assert.Equal(new string[] { "custom1, and custom2", "custom3" }, response.Headers.GetValues("Custom-Header1"));
- diff --git a/test/Microsoft.AspNetCore.Server.HttpSys.Tests/Microsoft.AspNetCore.Server.HttpSys.Tests.csproj b/test/Microsoft.AspNetCore.Server.HttpSys.Tests/Microsoft.AspNetCore.Server.HttpSys.Tests.csproj
- index 0429172ecd4..5628726d51b 100644
- --- a/test/Microsoft.AspNetCore.Server.HttpSys.Tests/Microsoft.AspNetCore.Server.HttpSys.Tests.csproj
- +++ b/test/Microsoft.AspNetCore.Server.HttpSys.Tests/Microsoft.AspNetCore.Server.HttpSys.Tests.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
- </PropertyGroup>
-
- <ItemGroup>
|