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:
parent
fec3cab2bb
commit
acb83826da
|
|
@ -3,7 +3,8 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
<RuntimeIdentifier Condition="'$(TargetFramework)'!='netcoreapp1.1'">win7-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
<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>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.StaticFiles
|
|||
{
|
||||
public static TestServer Create(Action<IApplicationBuilder> configureApp, Action<IServiceCollection> configureServices = null)
|
||||
{
|
||||
var contentRootNet451 = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
|
||||
var contentRootNet452 = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
|
||||
"." : "../../../../test/Microsoft.AspNetCore.StaticFiles.Tests";
|
||||
Action<IServiceCollection> defaultConfigureServices = services => { };
|
||||
var configuration = new ConfigurationBuilder()
|
||||
|
|
@ -26,8 +26,8 @@ namespace Microsoft.AspNetCore.StaticFiles
|
|||
})
|
||||
.Build();
|
||||
var builder = new WebHostBuilder()
|
||||
#if NET451
|
||||
.UseContentRoot(contentRootNet451)
|
||||
#if NET452
|
||||
.UseContentRoot(contentRootNet452)
|
||||
#endif
|
||||
.UseConfiguration(configuration)
|
||||
.Configure(configureApp)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.StaticFiles
|
|||
public static class TestDirectory
|
||||
{
|
||||
public static readonly string BaseDirectory
|
||||
#if NET451
|
||||
#if NET452
|
||||
= AppDomain.CurrentDomain.BaseDirectory;
|
||||
#else
|
||||
= AppContext.BaseDirectory;
|
||||
|
|
|
|||
Loading…
Reference in New Issue