Remove net451 as a cross-compile target
This commit is contained in:
parent
f31c302e5c
commit
c3d312b0b0
|
|
@ -36,4 +36,5 @@ node_modules
|
||||||
**/[Cc]ompiler/[Rr]esources/**/*.js
|
**/[Cc]ompiler/[Rr]esources/**/*.js
|
||||||
*launchSettings.json
|
*launchSettings.json
|
||||||
.build/
|
.build/
|
||||||
.testPublish/
|
.testPublish/
|
||||||
|
global.json
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Antiforgery.Internal
|
||||||
|
|
||||||
return sha256;
|
return sha256;
|
||||||
}
|
}
|
||||||
#else
|
#elif NET46
|
||||||
public static SHA256 CreateSHA256()
|
public static SHA256 CreateSHA256()
|
||||||
{
|
{
|
||||||
SHA256 sha256;
|
SHA256 sha256;
|
||||||
|
|
@ -33,6 +33,8 @@ namespace Microsoft.AspNetCore.Antiforgery.Internal
|
||||||
|
|
||||||
return sha256;
|
return sha256;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#error target frameworks need to be updated.
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>An antiforgery system for ASP.NET Core designed to generate and validate tokens to prevent Cross-Site Request Forgery attacks.</Description>
|
<Description>An antiforgery system for ASP.NET Core designed to generate and validate tokens to prevent Cross-Site Request Forgery attacks.</Description>
|
||||||
<TargetFrameworks>netstandard1.3;net451</TargetFrameworks>
|
<TargetFrameworks>netstandard1.3;net46</TargetFrameworks>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>aspnetcore;antiforgery</PackageTags>
|
<PackageTags>aspnetcore;antiforgery</PackageTags>
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ namespace Microsoft.AspNetCore.Antiforgery.Internal
|
||||||
identity.AddClaim(new Claim(ClaimTypes.Email, "someone@antifrogery.com"));
|
identity.AddClaim(new Claim(ClaimTypes.Email, "someone@antifrogery.com"));
|
||||||
identity.AddClaim(new Claim(ClaimTypes.GivenName, "some"));
|
identity.AddClaim(new Claim(ClaimTypes.GivenName, "some"));
|
||||||
identity.AddClaim(new Claim(ClaimTypes.Surname, "one"));
|
identity.AddClaim(new Claim(ClaimTypes.Surname, "one"));
|
||||||
#if NET452
|
#if NET46
|
||||||
// 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
|
#elif NETCOREAPP2_0
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.0;net452</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
||||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
<PackageReference Include="Microsoft.Extensions.WebEncoders" Version="$(AspNetCoreVersion)" />
|
<PackageReference Include="Microsoft.Extensions.WebEncoders" Version="$(AspNetCoreVersion)" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
|
||||||
<PackageReference Include="Moq" Version="$(MoqVersion)" />
|
<PackageReference Include="Moq" Version="$(MoqVersion)" />
|
||||||
|
<PackageReference Include="System.Security.Claims" Version="$(CoreFxVersion)" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
|
||||||
<PackageReference Include="xunit" Version="$(XunitVersion)" />
|
<PackageReference Include="xunit" Version="$(XunitVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue