Update to net46
This commit is contained in:
parent
cba17bd4ae
commit
4d5f726e67
|
|
@ -28,3 +28,4 @@ project.lock.json
|
|||
.build/
|
||||
.testPublish/
|
||||
/.vs/
|
||||
global.json
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<AspNetCoreLabsVersion>0.3.0-*</AspNetCoreLabsVersion>
|
||||
<CoreFxVersion>4.3.0</CoreFxVersion>
|
||||
<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>net46;netcoreapp2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<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>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore;staticfiles</PackageTags>
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
<RuntimeIdentifier Condition="'$(TargetFramework)'!='netcoreapp1.1'">win7-x64</RuntimeIdentifier>
|
||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
<RuntimeIdentifier Condition="'$(TargetFramework)'!='netcoreapp2.0'">win7-x64</RuntimeIdentifier>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.StaticFiles
|
|||
{
|
||||
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";
|
||||
Action<IServiceCollection> defaultConfigureServices = services => { };
|
||||
var configuration = new ConfigurationBuilder()
|
||||
|
|
@ -26,8 +26,11 @@ namespace Microsoft.AspNetCore.StaticFiles
|
|||
})
|
||||
.Build();
|
||||
var builder = new WebHostBuilder()
|
||||
#if NET452
|
||||
.UseContentRoot(contentRootNet452)
|
||||
#if NET46
|
||||
.UseContentRoot(contentRootNet46)
|
||||
#elif NETCOREAPP2_0
|
||||
#else
|
||||
#error the target framework needs to be updated.
|
||||
#endif
|
||||
.UseConfiguration(configuration)
|
||||
.Configure(configureApp)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.StaticFiles
|
|||
public static class TestDirectory
|
||||
{
|
||||
public static readonly string BaseDirectory
|
||||
#if NET452
|
||||
#if NET46
|
||||
= AppDomain.CurrentDomain.BaseDirectory;
|
||||
#else
|
||||
= AppContext.BaseDirectory;
|
||||
|
|
|
|||
Loading…
Reference in New Issue