Skip to content

Commit dd81f16

Browse files
martincostellokinosangkevinchalet
authored
Support ASP.NET 5.0 (#109)
* Update to ASP.NET 5 RC1 (#88) * Update to ASP.NET 5 * Completely remove JSON.NET reference * Opt in Nullable Reference Types * fix nullable errors * bump versions * Update to ASP.NET 5 Preview 7 * Update SDKs * re-target to .net 5.0 rc1 * fix nullable issues * Downgrade to match the version 5.0 will ship with. Co-authored-by: Martin Costello <[email protected]> * Apply suggestions from code review Co-authored-by: Martin Costello <[email protected]> * refactor ProcessGenericDocument to avoid null response Co-authored-by: Martin Costello <[email protected]> * Use <DebugType>portable</DebugType> to avoid embedding the PDBs in the assemblies * Fix build.yml to push packages to the aspnet-contrib MyGet feed * Update to ASP.NET 5 RC2 Update to RC2 of ASP.NET 5. * Use new syntax to set environment variable Use new syntax to set environment variable value. See https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable. * Use Write-Output Use Write-Output instead of Write-Host. * Use GITHUB_ENV not GITHUB_PATH That's what happens when the example of how to do one thing is in the section about how to do something else. * Update to ASP.NET 5 Update to the final release of ASP.NET 5. Update Shouldly. * Bump version to 5.0.1 Bump version to 5.0.1 for next release. Revert prerelease label to preview. * Use new ReadAs*() overloads Use new ReadAs*() overloads that accept a CancellationToken. * Use built-in SDK analyzers Use the code analyzers built into the .NET 5.0 SDK. Fix (or suppress) analyzer warnings. * Stop using NuGet's Central Package Version Management feature Co-authored-by: Chino Chang <[email protected]> Co-authored-by: Kévin Chalet <[email protected]>
1 parent 49d4cb7 commit dd81f16

25 files changed

+162
-126
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ x64/
3636
*_i.c
3737
*_p.c
3838
*.ilk
39+
*.binlog
3940
*.meta
4041
*.obj
4142
*.pch
@@ -108,7 +109,7 @@ publish/
108109
*.Publish.xml
109110

110111
# NuGet Packages Directory
111-
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
112+
.packages/
112113
packages/
113114

114115
# Windows Azure Build Output

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"editorconfig.editorconfig",
4+
"ms-dotnettools.csharp"
5+
]
6+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RuleSet Name="AspNet.Security.OpenId.Providers Rules" Description="This rule set contains rules for the AspNet.Security.OpenId.Providers solution." ToolsVersion="16.0">
3+
<IncludeAll Action="Warning" />
4+
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
5+
<Rule Id="CA1014" Action="None" />
6+
<Rule Id="CA1024" Action="None" />
7+
<Rule Id="CA1031" Action="None" />
8+
<Rule Id="CA1034" Action="None" />
9+
<Rule Id="CA1044" Action="None" />
10+
<Rule Id="CA1052" Action="None" />
11+
<Rule Id="CA1056" Action="None" />
12+
<Rule Id="CA1062" Action="None" />
13+
<Rule Id="CA1303" Action="None" />
14+
<Rule Id="CA1308" Action="None" />
15+
<Rule Id="CA1721" Action="None" />
16+
<Rule Id="CA1724" Action="None" />
17+
<Rule Id="CA1725" Action="None" />
18+
<Rule Id="CA1812" Action="None" />
19+
<Rule Id="CA2007" Action="None" />
20+
<Rule Id="CA2201" Action="None" />
21+
<Rule Id="CA2208" Action="None" />
22+
<Rule Id="CA2234" Action="None" />
23+
</Rules>
24+
</RuleSet>

AspNet.Security.OpenId.Providers.sln

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2424
.gitignore = .gitignore
2525
.travis.yml = .travis.yml
2626
appveyor.yml = appveyor.yml
27+
AspNet.Security.OpenId.Providers.ruleset = AspNet.Security.OpenId.Providers.ruleset
2728
build.cmd = build.cmd
2829
build.ps1 = build.ps1
2930
build.sh = build.sh
3031
CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
3132
Directory.Build.props = Directory.Build.props
3233
Directory.Build.targets = Directory.Build.targets
34+
.vscode\extensions.json = .vscode\extensions.json
3335
global.json = global.json
3436
LICENSE = LICENSE
3537
NuGet.config = NuGet.config

Directory.Build.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<DebugSymbols>true</DebugSymbols>
1010
<DebugType>portable</DebugType>
1111
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
12+
<DefineConstants Condition=" '$(Configuration)' == 'Debug' ">$(DefineConstants);JETBRAINS_ANNOTATIONS</DefineConstants>
13+
<Nullable>enable</Nullable>
1214
</PropertyGroup>
1315

1416
<PropertyGroup>
@@ -42,6 +44,12 @@
4244
<RepositoryUrl>git://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers</RepositoryUrl>
4345
</PropertyGroup>
4446

47+
<PropertyGroup>
48+
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
49+
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)AspNet.Security.OpenId.Providers.ruleset</CodeAnalysisRuleSet>
50+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
51+
</PropertyGroup>
52+
4553
<PropertyGroup>
4654
<RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir>
4755
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>

NuGet.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<configuration>
33
<packageSources>
44
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
5+
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
56
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
67
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
78
<add key="azureadwebstacknightly" value="https://www.myget.org/F/azureadwebstacknightly/api/v3/index.json" />

eng/Versions.props

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
<Project>
22

33
<PropertyGroup>
4-
<MajorVersion>3</MajorVersion>
5-
<MinorVersion>1</MinorVersion>
4+
<MajorVersion>5</MajorVersion>
5+
<MinorVersion>0</MinorVersion>
66
<PatchVersion>1</PatchVersion>
77
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
88
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
9+
<PreReleaseVersionIteration></PreReleaseVersionIteration>
10+
<PreReleaseBrandingLabel>Preview $(PreReleaseVersionIteration)</PreReleaseBrandingLabel>
911
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
1012
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
13+
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
14+
<IncludePreReleaseLabelInPackageVersion Condition=" '$(DotNetFinalVersionKind)' == 'release' ">false</IncludePreReleaseLabelInPackageVersion>
1115
</PropertyGroup>
1216

1317
</Project>

global.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"tools": {
3-
"dotnet": "3.1.301"
3+
"dotnet": "5.0.100"
44
},
55

66
"msbuild-sdks": {
7-
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20180.5",
8-
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20180.5"
7+
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20431.1",
8+
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20431.1"
99
}
1010
}

samples/Mvc.Client/Controllers/AuthenticationController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public async Task<IActionResult> SignIn([FromForm] string provider)
3939
}
4040

4141
[HttpGet("~/signout"), HttpPost("~/signout")]
42-
public IActionResult SignOut()
42+
public IActionResult SignOutCurrentUser()
4343
{
4444
// Instruct the cookies middleware to delete the local cookie created
4545
// when the user agent is redirected from the external identity provider
@@ -48,4 +48,4 @@ public IActionResult SignOut()
4848
CookieAuthenticationDefaults.AuthenticationScheme);
4949
}
5050
}
51-
}
51+
}

samples/Mvc.Client/Mvc.Client.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net5.0</TargetFrameworks>
55
<UserSecretsId>AspNet.Security.OpenId.Providers.Mvc.Client</UserSecretsId>
66
</PropertyGroup>
77

0 commit comments

Comments
 (0)