dotnet / dotnet/Scaffolding

MVC without auth, scaffold Identity - Program.cs is missing app.MapRazorPages

Open
#1,709 0 comments 0 reactions 0 assignees View on GitHub
area-scaffolding customer-reported
Dominant language
C#
Stars
818
Forks
260
Avg merge
1d 8h
Merged PRs (30d)
10

Description

Version: .NET 6, Recommend you fix this for .NET 7

1. Create a new MVC project ***withOUT*** auth.
2. Scaffold Auth

Expected result:
With all the changes made to *Program.cs*, why not add in `app.MapRazorPages();` ?

The following image is a diff after running scaffolding on a MVC app created without auth:

![image](https://user-images.githubusercontent.com/3605364/142554545-e07a7280-b9e6-4412-adbc-4355e5ab3ea9.png)

Work around: Add `app.MapRazorPages();`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.