question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Identity scaffolder --listFiles option doesn't work properly if default UI was already overridden

See original GitHub issue

Environment: Ubuntu Linux 16.04.6 LTS, dotnet info:

.NET Core SDK (reflecting any global.json):
 Version:   2.2.105
 Commit:    7cecb35b92

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  16.04
 OS Platform: Linux
 RID:         ubuntu.16.04-x64
 Base Path:   /usr/share/dotnet/sdk/2.2.105/

Host (useful for support):
  Version: 2.2.3
  Commit:  6b8ad509b6

.NET Core SDKs installed:
  2.2.105 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Steps to reproduce:


dotnet new mvc
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
dotnet aspnet-codegenerator identity -fi "Account.Login;Account.AccessDenied"
dotnet aspnet-codegenerator identity -lf

It’s a simplified example; in real-world project it might be needed to scaffold another file after the initial ones are already scaffolded or overridden and one might need to consult a list of files quickly.

Expected behavior:

Scaffolder gives a list of files that it can generate.

Actual behavior:

dot_sent@sergey-pc:~/Projects/test$ dotnet aspnet-codegenerator identity -lf
Building project ...
Finding the generator 'identity'...
Running the generator 'identity'...
The below files exist. Use '--force' to overwrite: Areas/Identity/Data/testIdentityDbContext.cs
Areas/Identity/Pages/Account/AccessDenied.cshtml
Areas/Identity/Pages/Account/AccessDenied.cshtml.cs
Areas/Identity/Pages/Account/Login.cshtml
Areas/Identity/Pages/Account/Login.cshtml.cs
   at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.<BuildCommandLine>b__6_0()
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.Execute(String[] args)
   at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)
RunTime 00:00:04.08
dot_sent@sergey-pc:~/Projects/test$ 

If I add the -f parameter, the scaffolder lists files successfully.

Additional information about the project being scaffolded, such as:

Target framework(s):

netcoreapp2.2

Package version of Microsoft.AspNetCore.App or Microsoft.AspNetCore.All (if applicable):

2.2.3 - both

Package version of Microsoft.VisualStudio.Web.CodeGeneration.Design - this may be added to your project by scaffolding:

2.2.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
CamSopercommented, Aug 8, 2019

@dot-sent My friend @scottaddie and I just hit this issue in 2.2, but it looks like it’s fixed in 3.0.

BTW, what a really well-written issue! Kudos!

0reactions
vijayrkncommented, Nov 11, 2019

Closing since the issue is fixed in 3.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identity scaffolder --listFiles option doesn't work properly if ...
If I add the -f parameter, the scaffolder lists files successfully. Additional information about the project being scaffolded, such as: Target ...
Read more >
How can I scaffold all identity files into an ASP.NET Core ...
This section starts with: To maintain full control of the Identity UI, run the Identity scaffolder and select Override all files.
Read more >
Scaffold Identity in ASP.NET Core projects
This document explains the steps needed to complete an Identity scaffolding update. We recommend using a source control system that shows file ...
Read more >
How to scaffold all identity files into an ASP.NET Core 2.1 ...
To maintain full control of the Identity UI, run the Identity scaffolder and select Override all files. There is no command given that...
Read more >
.NET Identity Scaffolding Error - YouTube
If you are taking a .NET Course, where we are using the .NET Identity Class Library for Authentication. Then with the latest update...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found