Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit acb8382

Browse files
committed
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
1 parent fec3cab commit acb8382

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

test/Microsoft.AspNetCore.StaticFiles.FunctionalTests/Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<Import Project="..\..\build\common.props" />
44

55
<PropertyGroup>
6-
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
6+
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
7+
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
78
<RuntimeIdentifier Condition="'$(TargetFramework)'!='netcoreapp1.1'">win7-x64</RuntimeIdentifier>
89
</PropertyGroup>
910

test/Microsoft.AspNetCore.StaticFiles.Tests/Microsoft.AspNetCore.StaticFiles.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<Import Project="..\..\build\common.props" />
44

55
<PropertyGroup>
6-
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
6+
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
7+
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
78
</PropertyGroup>
89

910
<ItemGroup>

test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFilesTestServer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static class StaticFilesTestServer
1616
{
1717
public static TestServer Create(Action<IApplicationBuilder> configureApp, Action<IServiceCollection> configureServices = null)
1818
{
19-
var contentRootNet451 = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
19+
var contentRootNet452 = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
2020
"." : "../../../../test/Microsoft.AspNetCore.StaticFiles.Tests";
2121
Action<IServiceCollection> defaultConfigureServices = services => { };
2222
var configuration = new ConfigurationBuilder()
@@ -26,8 +26,8 @@ public static TestServer Create(Action<IApplicationBuilder> configureApp, Action
2626
})
2727
.Build();
2828
var builder = new WebHostBuilder()
29-
#if NET451
30-
.UseContentRoot(contentRootNet451)
29+
#if NET452
30+
.UseContentRoot(contentRootNet452)
3131
#endif
3232
.UseConfiguration(configuration)
3333
.Configure(configureApp)

test/shared/TestBaseDir.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.StaticFiles
88
public static class TestDirectory
99
{
1010
public static readonly string BaseDirectory
11-
#if NET451
11+
#if NET452
1212
= AppDomain.CurrentDomain.BaseDirectory;
1313
#else
1414
= AppContext.BaseDirectory;

0 commit comments

Comments
 (0)