Converted test project to run on netcoreapp2.0

This commit is contained in:
Kiran Challa 2017-03-21 16:57:47 -07:00 committed by Kiran Challa
parent 151e792ecb
commit f31c302e5c
3 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,7 @@
<CoreFxVersion>4.3.0</CoreFxVersion> <CoreFxVersion>4.3.0</CoreFxVersion>
<MoqVersion>4.7.1</MoqVersion> <MoqVersion>4.7.1</MoqVersion>
<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>

View File

@ -63,6 +63,9 @@ namespace Microsoft.AspNetCore.Antiforgery.Internal
#if NET452 #if NET452
// CoreCLR doesn't support an 'empty' name // CoreCLR doesn't support an 'empty' name
identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, string.Empty)); identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, string.Empty));
#elif NETCOREAPP2_0
#else
#error Target framework needs to be updated
#endif #endif
// Arrange // Arrange

View File

@ -3,8 +3,8 @@
<Import Project="..\..\build\common.props" /> <Import Project="..\..\build\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks> <TargetFrameworks>netcoreapp2.0;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks> <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>