netcoreapp2.0 (#1810)
This commit is contained in:
parent
49a6be9b81
commit
a9c165e666
|
|
@ -3,7 +3,7 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal
|
|||
_logger.LogDebug(builder.ToString());
|
||||
}
|
||||
|
||||
#if NET46
|
||||
// The below APM methods call the underlying Read/WriteAsync methods which will still be logged.
|
||||
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
||||
{
|
||||
|
|
@ -209,9 +208,5 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal
|
|||
}, tcs, cancellationToken);
|
||||
return tcs.Task;
|
||||
}
|
||||
#elif NETSTANDARD1_3
|
||||
#else
|
||||
#error target frameworks need to be updated.
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal
|
|||
}
|
||||
}
|
||||
|
||||
#if NET46
|
||||
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
||||
{
|
||||
var task = ReadAsync(buffer, offset, count, default(CancellationToken), state);
|
||||
|
|
@ -210,9 +209,5 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal
|
|||
}, tcs, cancellationToken);
|
||||
return tcs.Task;
|
||||
}
|
||||
#elif NETSTANDARD1_3
|
||||
#else
|
||||
#error target frameworks need to be updated.
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET46
|
||||
using System;
|
||||
#endif
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -116,7 +114,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
|||
return _responseStream.FlushAsync(cancellationToken);
|
||||
}
|
||||
|
||||
#if NET46
|
||||
public override void Close()
|
||||
{
|
||||
_requestStream.Close();
|
||||
|
|
@ -142,10 +139,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
|||
{
|
||||
_responseStream.EndWrite(asyncResult);
|
||||
}
|
||||
#elif NETSTANDARD1_3
|
||||
#else
|
||||
#error target frameworks need to be updated.
|
||||
#endif
|
||||
|
||||
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
|||
return ReadAsync(buffer, offset, count).Result;
|
||||
}
|
||||
|
||||
#if NET46
|
||||
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
||||
{
|
||||
var task = ReadAsync(buffer, offset, count, default(CancellationToken), state);
|
||||
|
|
@ -97,10 +96,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
|||
}, tcs, cancellationToken);
|
||||
return tcs.Task;
|
||||
}
|
||||
#elif NETSTANDARD1_3
|
||||
#else
|
||||
#error target frameworks need to be updated
|
||||
#endif
|
||||
|
||||
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
|||
_frameControl.Write(new ArraySegment<byte>(buffer, offset, count));
|
||||
}
|
||||
|
||||
#if NET46
|
||||
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
||||
{
|
||||
var task = WriteAsync(buffer, offset, count, default(CancellationToken), state);
|
||||
|
|
@ -103,10 +102,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
|||
}, tcs, cancellationToken);
|
||||
return tcs.Task;
|
||||
}
|
||||
#elif NETSTANDARD1_3
|
||||
#else
|
||||
#error target frameworks need to be updated.
|
||||
#endif
|
||||
|
||||
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
using System;
|
||||
using System.IO;
|
||||
#if NET46
|
||||
using System.Runtime.Remoting;
|
||||
#endif
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
@ -92,7 +89,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure
|
|||
public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
|
||||
=> _inner.CopyToAsync(destination, bufferSize, cancellationToken);
|
||||
|
||||
#if NET46
|
||||
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
||||
=> _inner.BeginRead(buffer, offset, count, callback, state);
|
||||
|
||||
|
|
@ -105,20 +101,12 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure
|
|||
public override void EndWrite(IAsyncResult asyncResult)
|
||||
=> _inner.EndWrite(asyncResult);
|
||||
|
||||
public override ObjRef CreateObjRef(Type requestedType)
|
||||
=> _inner.CreateObjRef(requestedType);
|
||||
|
||||
public override object InitializeLifetimeService()
|
||||
=> _inner.InitializeLifetimeService();
|
||||
|
||||
public override void Close()
|
||||
=> _inner.Close();
|
||||
|
||||
#elif NETSTANDARD1_3
|
||||
#else
|
||||
#error Target framework should be updated
|
||||
#endif
|
||||
|
||||
public override bool Equals(object obj)
|
||||
=> _inner.Equals(obj);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<Description>Core components of ASP.NET Core Kestrel cross-platform web server.</Description>
|
||||
<TargetFrameworks>netstandard1.3;net46</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore;kestrel</PackageTags>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
|
@ -19,21 +19,12 @@
|
|||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.TaskCache.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
|
||||
|
||||
<PackageReference Include="System.ValueTuple" Version="$(CoreFxVersion)" />
|
||||
<PackageReference Include="System.Threading.Tasks.Extensions" Version="$(CoreFxVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
|
||||
<PackageReference Include="System.Diagnostics.Process" Version="$(CoreFxVersion)" />
|
||||
<PackageReference Include="System.Threading.Thread" Version="$(CoreFxVersion)" />
|
||||
<PackageReference Include="System.Threading.ThreadPool" Version="$(CoreFxVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="CoreStrings.resx">
|
||||
<Generator></Generator>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Https
|
|||
}
|
||||
}
|
||||
|
||||
var certificate2 = ConvertToX509Certificate2(certificate);
|
||||
var certificate2 = (X509Certificate2)certificate;
|
||||
if (certificate2 == null)
|
||||
{
|
||||
return false;
|
||||
|
|
@ -105,28 +105,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Https
|
|||
return new HttpsAdaptedConnection(sslStream);
|
||||
}
|
||||
|
||||
private static X509Certificate2 ConvertToX509Certificate2(X509Certificate certificate)
|
||||
{
|
||||
if (certificate == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
X509Certificate2 certificate2 = certificate as X509Certificate2;
|
||||
if (certificate2 != null)
|
||||
{
|
||||
return certificate2;
|
||||
}
|
||||
|
||||
#if NETSTANDARD1_3
|
||||
// conversion X509Certificate to X509Certificate2 not supported
|
||||
// https://github.com/dotnet/corefx/issues/4510
|
||||
return null;
|
||||
#else
|
||||
return new X509Certificate2(certificate);
|
||||
#endif
|
||||
}
|
||||
|
||||
private class HttpsAdaptedConnection : IAdaptedConnection
|
||||
{
|
||||
private readonly SslStream _sslStream;
|
||||
|
|
@ -140,7 +118,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Https
|
|||
|
||||
public void PrepareRequest(IFeatureCollection requestFeatures)
|
||||
{
|
||||
var clientCertificate = ConvertToX509Certificate2(_sslStream.RemoteCertificate);
|
||||
var clientCertificate = (X509Certificate2)_sslStream.RemoteCertificate;
|
||||
if (clientCertificate != null)
|
||||
{
|
||||
requestFeatures.Set<ITlsConnectionFeature>(new TlsConnectionFeature { ClientCertificate = clientCertificate });
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<Description>HTTPS support for the ASP.NET Core Kestrel cross-platform web server.</Description>
|
||||
<TargetFrameworks>netstandard1.3;net46</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore;kestrel</PackageTags>
|
||||
<NoWarn>CS1591;$(NoWarn)</NoWarn>
|
||||
|
|
@ -20,8 +20,4 @@
|
|||
<PackageReference Include="Microsoft.Extensions.TaskCache.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
|
||||
<PackageReference Include="System.Net.Security" Version="$(CoreFxVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<Description>Transport abstractions for the ASP.NET Core Kestrel cross-platform web server.</Description>
|
||||
<TargetFrameworks>netstandard1.3</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore;kestrel</PackageTags>
|
||||
<NoWarn>CS1570;CS1571;CS1572;CS1573;CS1574;CS1591;$(NoWarn)</NoWarn>
|
||||
|
|
@ -14,7 +14,6 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="$(CoreFxVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Internal.CoreFxLab.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<Description>Libuv transport for the ASP.NET Core Kestrel cross-platform web server.</Description>
|
||||
<TargetFramework>netstandard1.3</TargetFramework>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore;kestrel</PackageTags>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
|
@ -13,8 +13,6 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Threading.Thread" Version="$(CoreFxVersion)" />
|
||||
<PackageReference Include="System.Threading.ThreadPool" Version="$(CoreFxVersion)" />
|
||||
<PackageReference Include="Libuv" Version="$(LibUvVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(AspNetCoreVersion)" />
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<Description>Managed socket transport for the ASP.NET Core Kestrel cross-platform web server.</Description>
|
||||
<TargetFrameworks>netstandard1.3</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore;kestrel</PackageTags>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<Description>ASP.NET Core Kestrel cross-platform web server.</Description>
|
||||
<TargetFrameworks>netstandard1.3;net46</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore;kestrel</PackageTags>
|
||||
<NoWarn>CS1591;$(NoWarn)</NoWarn>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.Server.Kestrel.Core\Microsoft.AspNetCore.Server.Kestrel.Core.csproj" />
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.csproj" />
|
||||
|
|
|
|||
|
|
@ -54,17 +54,12 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
|
|||
await Assert.ThrowsAsync<NotSupportedException>(() => stream.ReadAsync(new byte[1], 0, 1));
|
||||
}
|
||||
|
||||
#if NET46
|
||||
[Fact]
|
||||
public void BeginReadThrows()
|
||||
{
|
||||
var stream = new FrameResponseStream(new MockFrameControl());
|
||||
Assert.Throws<NotSupportedException>(() => stream.BeginRead(new byte[1], 0, 1, null, null));
|
||||
}
|
||||
#elif NETCOREAPP2_0
|
||||
#else
|
||||
#error Target framework needs to be updated
|
||||
#endif
|
||||
|
||||
[Fact]
|
||||
public void SeekThrows()
|
||||
|
|
|
|||
|
|
@ -3,16 +3,8 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
<PlatformTarget Condition="'$(TargetFramework)' == 'net46'">x64</PlatformTarget>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
||||
<!--
|
||||
Workaround for "Explicit RID still required for .NET Framework test projects" (https://github.com/dotnet/sdk/issues/909).
|
||||
Remove when fixed.
|
||||
-->
|
||||
<OutputType>exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NETCOREAPP2_0
|
||||
|
||||
using System.IO;
|
||||
using Xunit;
|
||||
|
||||
|
|
@ -39,9 +37,4 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#elif NET46
|
||||
#else
|
||||
#error Target framework needs to be updated
|
||||
#endif
|
||||
}
|
||||
|
|
@ -3,11 +3,7 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
<PlatformTarget Condition="'$(TargetFramework)' == 'net46'">x64</PlatformTarget>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||
|
||||
<!--
|
||||
|
|
@ -26,6 +22,7 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Server.Kestrel\Microsoft.AspNetCore.Server.Kestrel.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Server.Kestrel.Https\Microsoft.AspNetCore.Server.Kestrel.Https.csproj" />
|
||||
<ProjectReference Include="..\..\tools\CodeGenerator\CodeGenerator.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -39,11 +36,6 @@
|
|||
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
|
||||
<ProjectReference Include="..\..\tools\CodeGenerator\CodeGenerator.csproj" />
|
||||
<PackageReference Include="System.Net.NetworkInformation" Version="$(CoreFxVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -3,11 +3,7 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
<PlatformTarget Condition="'$(TargetFramework)' == 'net46'">x64</PlatformTarget>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -3,17 +3,9 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
<PlatformTarget Condition="'$(TargetFramework)' == 'net46'">x64</PlatformTarget>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||
|
||||
<!--
|
||||
Workaround for "Explicit RID still required for .NET Framework test projects" (https://github.com/dotnet/sdk/issues/909).
|
||||
Remove when fixed.
|
||||
-->
|
||||
<OutputType>exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -8,14 +8,7 @@ namespace Microsoft.AspNetCore.Testing
|
|||
{
|
||||
public static class TestResources
|
||||
{
|
||||
private static readonly string _testCertificatePath =
|
||||
#if NET46
|
||||
Path.Combine(Directory.GetCurrentDirectory(), "testCert.pfx");
|
||||
#elif NETCOREAPP2_0
|
||||
Path.Combine(AppContext.BaseDirectory, "testCert.pfx");
|
||||
#else
|
||||
#error Target framework needs to be updated
|
||||
#endif
|
||||
private static readonly string _testCertificatePath = Path.Combine(AppContext.BaseDirectory, "testCert.pfx");
|
||||
|
||||
public static string TestCertificatePath => _testCertificatePath;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue