Converted samples and test projects to run on netcoreapp2.0
This commit is contained in:
parent
876a025543
commit
7e9b92072e
|
|
@ -4,6 +4,7 @@
|
|||
<CoreFxVersion>4.3.0</CoreFxVersion>
|
||||
<MoqVersion>4.7.1</MoqVersion>
|
||||
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
|
||||
<RuntimeFrameworkVersion>2.0.0-*</RuntimeFrameworkVersion>
|
||||
<TestSdkVersion>15.0.0</TestSdkVersion>
|
||||
<XunitVersion>2.2.0</XunitVersion>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<Import Project="..\..\build\dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net451;netcoreapp1.1</TargetFrameworks>
|
||||
<TargetFrameworks>net451;netcoreapp2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<Import Project="..\..\build\dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net451;netcoreapp1.1</TargetFrameworks>
|
||||
<TargetFrameworks>net451;netcoreapp2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<Import Project="..\..\build\dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net451;netcoreapp1.1</TargetFrameworks>
|
||||
<TargetFrameworks>net451;netcoreapp2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<Import Project="..\..\build\dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net451;netcoreapp1.1</TargetFrameworks>
|
||||
<TargetFrameworks>net451;netcoreapp2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp2.0;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp2.0;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -133,6 +133,9 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests
|
|||
|
||||
Assert.Equal(buffer, written);
|
||||
}
|
||||
#elif NETCOREAPP2_0
|
||||
#else
|
||||
#error Target framework needs to be updated
|
||||
#endif
|
||||
|
||||
private class MockResponseCompressionProvider: IResponseCompressionProvider
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp2.0;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -508,12 +508,12 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests
|
|||
#if NET452 // Flush not supported, compression disabled
|
||||
Assert.NotNull(response.Headers.GetValues(HeaderNames.ContentMD5));
|
||||
Assert.Empty(response.Content.Headers.ContentEncoding);
|
||||
#elif NETCOREAPP1_1 // Flush supported, compression enabled
|
||||
#elif NETCOREAPP2_0 // Flush supported, compression enabled
|
||||
IEnumerable<string> contentMD5 = null;
|
||||
Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
|
||||
Assert.Single(response.Content.Headers.ContentEncoding, "gzip");
|
||||
#else
|
||||
Not implemented, compiler break
|
||||
#error Target framework needs to be updated
|
||||
#endif
|
||||
|
||||
var body = await response.Content.ReadAsStreamAsync();
|
||||
|
|
@ -573,12 +573,12 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests
|
|||
#if NET452 // Flush not supported, compression disabled
|
||||
Assert.NotNull(response.Headers.GetValues(HeaderNames.ContentMD5));
|
||||
Assert.Empty(response.Content.Headers.ContentEncoding);
|
||||
#elif NETCOREAPP1_1 // Flush supported, compression enabled
|
||||
#elif NETCOREAPP2_0 // Flush supported, compression enabled
|
||||
IEnumerable<string> contentMD5 = null;
|
||||
Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
|
||||
Assert.Single(response.Content.Headers.ContentEncoding, "gzip");
|
||||
#else
|
||||
Not implemented, compiler break
|
||||
#error Target framework needs to be updated
|
||||
#endif
|
||||
|
||||
var body = await response.Content.ReadAsStreamAsync();
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp2.0;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue