Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROPOSAL: Update or add some ASP.NET Core code samples to use ASP.NET Core 2.0 #4933

Closed
eriawan opened this issue Dec 6, 2017 · 11 comments
Closed
Milestone

Comments

@eriawan
Copy link
Member

eriawan commented Dec 6, 2017

General

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)

Issues with Existing Topics

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.

Proposal intents

  1. Update the docs and code samples as needed, we should use ASP.NET Core 2.0 instead of ASP.NET Core 1.0.
  2. Use VS 2017 at least 15.4.0 to ensure smooth use of ASP.NET Core 2.0 and .NET Core 2.0 as base IDE to write updated code samples. We could also use VS Code at least version 1.17, only if we want to ensure that the code will work for VS Code too. The use of VS Code will appeal to broader audiences 🙂
  3. Add necessary update on the title if necessary.
  4. If multi version of ASP.NET Core is needed in the topics, then the sample code folders need to be updated for these changes.

Questions:

  • Could I specify the use of VS 2017 15.4.x as the minimal version of Visual Studio to use?

NOTE:

  • If my proposal is accepted, I'll open a new issue to track pages and sample codes that needs to be updated

cc @scottaddie , @Rick-Anderson

@eriawan
Copy link
Member Author

eriawan commented Dec 6, 2017

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..

@Rick-Anderson
Copy link
Contributor

@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.

@scottaddie
Copy link
Member

scottaddie commented Dec 6, 2017

@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.

@eriawan
Copy link
Member Author

eriawan commented Dec 7, 2017

@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.

@eriawan
Copy link
Member Author

eriawan commented Dec 7, 2017

@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.

@scottaddie
Copy link
Member

@eriawan
Copy link
Member Author

eriawan commented Dec 7, 2017

@scottaddie
Quite simple. Thanks, I'm starting to work on updating them now.

@Rick-Anderson Rick-Anderson added this to the Backlog milestone Dec 8, 2017
@guardrex
Copy link
Collaborator

@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.

@eriawan
Copy link
Member Author

eriawan commented Dec 13, 2017

@guardrex
I'm still working on the DI and the middleware sample.

@guardrex
Copy link
Collaborator

Looks like work here stopped, and this issue is superseded by #5495.

@eriawan
Copy link
Member Author

eriawan commented Feb 27, 2018

ah, you got me first, @guardrex :)

ok, thanks for the updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants