Some current topics in ASP.NET Core docs have sample codes and explanations that are valid for ASP.NET Core 1.0.
For example, these are ASP.NET Core topics that use ASP.NET Core 1.0 code: (these are even using obsoleted xproj)
Those docs and the sample codes above are using ASP.NET Core 1.0, and it will be not valid or not usable for ASP.NET Core 2.0 (hence not usable for .NET Core 2.0). Therefore those topics and the sample codes should be updated to ASP.NET.
Also the code samples in those topics are still using x-plat xproj model instead of newer .NET Core csproj in VS 2017.
Questions:
NOTE:
cc @scottaddie , @Rick-Anderson
This proposal is also valid useful to address this issue #4850 that use ASP.NET Core 1.0 specific code that needs to be updated, based on the comment from Geoffrey_Braaf:
https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies
IMHO, this issue is already taken by @scottaddie , so I will not fix the custom policy page. CMIIW, though..
@eriawan we would like to update all the samples/docs to 2.0 but also retain the 1.x version and docs.
Use the following tab markup:
# [ASP.NET Core 2.x](#tab/aspnetcore2x)
<!-- [ASP.NET Core 2.x goes here -->
# [ASP.NET Core 1.x](#tab/aspnetcore1x)
<!-- [ASP.NET Core 1.x goes here -->
The following line ends the tab content.
------
Create 1 issue per doc you will be updating. DI sounds like a good one to start on.
@eriawan I am indeed nearing completion on that Policy Authorization doc.
If you create new ASP.NET Core 2.0 sample apps, Razor Pages is generally preferred over MVC.
@Rick-Anderson
Create 1 issue per doc you will be updating. DI sounds like a good one to start on.
The download sample code on the DI page points to sample code that use ASP.NET Core 1.0.
How should we handle this? Should we leave the sample as is and add a new ASP.NET Core 2.0 sample code by having 2 folders of ASP.NET Core 1.0 and 2.0 separately?
I mean, for example, instead of the existing folder structure of /aspnetcore/fundamentals/dependency-injection/sample; we will use folder structure of /aspnetcore/fundamentals/dependency-injection/1.0 for ASP.NET Core 1.0, and /aspnetcore/fundamentals/dependency-injection/2.0 for ASP.NET Core 2.0.
@scottaddie
If you create new ASP.NET Core 2.0 sample apps, Razor Pages is generally preferred over MVC.
Thanks for the suggestion! Cool, I will use Razor Pages for those planned updated sample of ASP.NET Core 2.0 codes.
@eriawan Here's an example of how I handled it in a different doc: https://github.com/aspnet/Docs/tree/master/aspnetcore/security/authorization/resourcebased/samples.
@scottaddie
Quite simple. Thanks, I'm starting to work on updating them now.
@eriawan Have you started working on the middleware sample yet? I ask because I'm about to put in a PR that will move the middleware sample in the TOC. If you haven't started working on that yet, you might want to hold off for just a couple of days until the dust settles on this PR. If you have, no worries, we'll just have to deal with any conflicts as they arise.
@guardrex
I'm still working on the DI and the middleware sample.
Looks like work here stopped, and this issue is superseded by https://github.com/aspnet/Docs/issues/5495.
ah, you got me first, @guardrex :)
ok, thanks for the updates
Most helpful comment
@eriawan we would like to update all the samples/docs to 2.0 but also retain the 1.x version and docs.
Use the following tab markup:
Create 1 issue per doc you will be updating. DI sounds like a good one to start on.