Bump test projects up to .NET 4.5.2

- aspnet/Testing#248
- xUnit no longer supports .NET 4.5.1
- build tests for desktop .NET only on Windows
This commit is contained in:
Doug Bunting 2017-02-14 08:37:12 -08:00
parent 945b4e63de
commit d4800d188a
10 changed files with 20 additions and 13 deletions

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Http\Microsoft.AspNetCore.Http.csproj" />

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Http\Microsoft.AspNetCore.Http.csproj" />

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Http.Features\Microsoft.AspNetCore.Http.Features.csproj" />

View File

@ -36,7 +36,7 @@ namespace Microsoft.AspNetCore.Http
contextFactory.Dispose(context);
}
#if NET451
#if NET452
private static void DomainFunc()
{
var accessor = new HttpContextAccessor();

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Http\Microsoft.AspNetCore.Http.csproj" />

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Http\Microsoft.AspNetCore.Http.csproj" />

View File

@ -293,7 +293,7 @@ namespace Microsoft.AspNetCore.WebUtilities
private static string GetCurrentDirectory()
{
#if NET451
#if NET452
return AppDomain.CurrentDomain.BaseDirectory;
#else
return AppContext.BaseDirectory;

View File

@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
Assert.Equal(expectedData, memoryStream.ToArray());
}
#if NET451
#if NET452
[Fact]
public async Task DoesNotFlush_UnderlyingStream_OnClosingWriter()
{
@ -68,7 +68,7 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
Assert.Equal(0, stream.FlushAsyncCallCount);
}
#if NET451
#if NET452
[Fact]
public async Task DoesNotClose_UnderlyingStream_OnDisposingWriter()
{
@ -113,7 +113,7 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
await writer.WriteAsync(new string('a', byteLength));
// Act
#if NET451
#if NET452
writer.Close();
#else
writer.Dispose();
@ -502,7 +502,7 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
return base.WriteAsync(buffer, offset, count, cancellationToken);
}
#if NET451
#if NET452
public override void Close()
{
CloseCallCount++;

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.WebUtilities\Microsoft.AspNetCore.WebUtilities.csproj" />

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Net.Http.Headers\Microsoft.Net.Http.Headers.csproj" />