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 Scaffolding on Ubuntu 20.04 using incorrect file paths dotnet 5

See original GitHub issue

Output of dotnet --info:

.NET SDK (reflecting any global.json):
 Version:   5.0.101
 Commit:    d05174dc5a

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

Host (useful for support):
  Version: 5.0.1
  Commit:  b02e13abab

.NET SDKs installed:
  3.1.404 [/usr/share/dotnet/sdk]
  5.0.101 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.10 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.10 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Steps to reproduce:

  1. Install the code generator: dotnet tool install -g dotnet-aspnet-codegenerator
  2. Create a project to scaffold into dotnet new webapp --auth Individual -o WebApp1
  3. cd into the new project directory
  4. Install Microsoft.VisualStudio.Web.CodeGeneration.Design
  5. Build the project to make sure everything works (build OK)
  6. run scaffold : dotnet aspnet-codegenerator identity -dc WebApp1.Data.ApplicationDbContext --files "Account.Register;Account.Login;Account.Logout;Account.RegisterConfirmation"

Expected behavior:

All Identity.UI Razor Pages are scaffolded into the project

Actual behavior:

A fatal error indicating a file was not found:

Account.RegisterConfirmation" Building project ... Finding the generator 'identity'... Running the generator 'identity'... A file matching the name Account.Register.cs.cshtml was not found within any of the folders: 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:09.87

Additional information about the project being scaffolded, such as:

Target framework(s):

net5.0

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

5.0.1

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

5.0.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
deepchoudherycommented, Feb 11, 2021

@mmousa8189 @jahnog @guustysebie I have a fix for this issue out with a new 3.1.5 and 5.0.2 package out.
Use dotnet tool update dotnet-aspnet-codegenerator -g --version 3.1.5/5.0.2 depending on if you are targeting .netcoreapp3.1 or net5.0. I would like it if someone could confirm the fix before I close the issue.

Apologize for the lengthy delay on this fix and appreciate all the feedback.

1reaction
deepchoudherycommented, Feb 26, 2021

Seems to work based on other feedback. Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identity Scaffolding on Ubuntu 20.04 using incorrect file paths
Build the project to make sure everything works (build OK) Scaffold all Identity pages: dotnet aspnet-codegenerator identity -dc IdentityApp. ...
Read more >
Identity Scaffolding on Ubuntu 20.04 using incorrect file ...
I was having an issue with Omnisharp not being able to generate my ... dotnet tool update dotnet-aspnet-codegenerator -g --version 6.0.2.
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 ...
Read more >
Newest 'asp.net-core-scaffolding' Questions - Stack Overflow
Identity Scaffolding on Ubuntu 20.04 using incorrect file paths dotnet 5. Output of dotnet --info: .NET SDK (reflecting any global.json): Version: 5.0.101 ...
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...
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