Update to net46
This commit is contained in:
parent
cba17bd4ae
commit
4d5f726e67
|
|
@ -28,3 +28,4 @@ project.lock.json
|
||||||
.build/
|
.build/
|
||||||
.testPublish/
|
.testPublish/
|
||||||
/.vs/
|
/.vs/
|
||||||
|
global.json
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
<AspNetCoreLabsVersion>0.3.0-*</AspNetCoreLabsVersion>
|
<AspNetCoreLabsVersion>0.3.0-*</AspNetCoreLabsVersion>
|
||||||
<CoreFxVersion>4.3.0</CoreFxVersion>
|
<CoreFxVersion>4.3.0</CoreFxVersion>
|
||||||
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
|
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
|
||||||
|
<RuntimeFrameworkVersion>2.0.0-*</RuntimeFrameworkVersion>
|
||||||
<TestSdkVersion>15.0.0</TestSdkVersion>
|
<TestSdkVersion>15.0.0</TestSdkVersion>
|
||||||
<XunitVersion>2.2.0</XunitVersion>
|
<XunitVersion>2.2.0</XunitVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<Import Project="..\..\build\dependencies.props" />
|
<Import Project="..\..\build\dependencies.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net451;netcoreapp1.1</TargetFrameworks>
|
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>ASP.NET Core static files middleware. Includes middleware for serving static files, directory browsing, and default files.</Description>
|
<Description>ASP.NET Core static files middleware. Includes middleware for serving static files, directory browsing, and default files.</Description>
|
||||||
<TargetFrameworks>net451;netstandard1.3</TargetFrameworks>
|
<TargetFramework>netstandard1.3</TargetFramework>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>aspnetcore;staticfiles</PackageTags>
|
<PackageTags>aspnetcore;staticfiles</PackageTags>
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,11 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
||||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||||
<RuntimeIdentifier Condition="'$(TargetFramework)'!='netcoreapp1.1'">win7-x64</RuntimeIdentifier>
|
<RuntimeIdentifier Condition="'$(TargetFramework)'!='netcoreapp2.0'">win7-x64</RuntimeIdentifier>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,10 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
||||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.StaticFiles
|
||||||
{
|
{
|
||||||
public static TestServer Create(Action<IApplicationBuilder> configureApp, Action<IServiceCollection> configureServices = null)
|
public static TestServer Create(Action<IApplicationBuilder> configureApp, Action<IServiceCollection> configureServices = null)
|
||||||
{
|
{
|
||||||
var contentRootNet452 = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
|
var contentRootNet46 = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
|
||||||
"." : "../../../../test/Microsoft.AspNetCore.StaticFiles.Tests";
|
"." : "../../../../test/Microsoft.AspNetCore.StaticFiles.Tests";
|
||||||
Action<IServiceCollection> defaultConfigureServices = services => { };
|
Action<IServiceCollection> defaultConfigureServices = services => { };
|
||||||
var configuration = new ConfigurationBuilder()
|
var configuration = new ConfigurationBuilder()
|
||||||
|
|
@ -26,8 +26,11 @@ namespace Microsoft.AspNetCore.StaticFiles
|
||||||
})
|
})
|
||||||
.Build();
|
.Build();
|
||||||
var builder = new WebHostBuilder()
|
var builder = new WebHostBuilder()
|
||||||
#if NET452
|
#if NET46
|
||||||
.UseContentRoot(contentRootNet452)
|
.UseContentRoot(contentRootNet46)
|
||||||
|
#elif NETCOREAPP2_0
|
||||||
|
#else
|
||||||
|
#error the target framework needs to be updated.
|
||||||
#endif
|
#endif
|
||||||
.UseConfiguration(configuration)
|
.UseConfiguration(configuration)
|
||||||
.Configure(configureApp)
|
.Configure(configureApp)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.StaticFiles
|
||||||
public static class TestDirectory
|
public static class TestDirectory
|
||||||
{
|
{
|
||||||
public static readonly string BaseDirectory
|
public static readonly string BaseDirectory
|
||||||
#if NET452
|
#if NET46
|
||||||
= AppDomain.CurrentDomain.BaseDirectory;
|
= AppDomain.CurrentDomain.BaseDirectory;
|
||||||
#else
|
#else
|
||||||
= AppContext.BaseDirectory;
|
= AppContext.BaseDirectory;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue