You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following error is thrown when running the command dotnet aspnet-codegenerator identity -lf.
The same error (sans stack trace) also occurs when attempting to scaffold any view via the IDE context menu.
[Trace]: Command Line: identity -lf
Building project ...
[Trace]: Command Line: --no-dispatch --port-number 64193 identity -lf --dispatcher-version 6.0.0+cc9d1f5236d926269a0471042f72bf83b498509c
Scaffolding failed.
The path is empty. (Parameter 'path')
[Trace]: at System.IO.Path.GetFullPath(String path)
at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at Microsoft.VisualStudio.Web.CodeGeneration.Msbuild.ProjectContextWriter.GetScaffoldingAssemblies(IEnumerable`1 dependencies)
at Microsoft.DotNet.Scaffolding.Shared.ProjectModel.ProjectContextExtensions.AddPackageDependencies(IProjectContext projectInformation, String projectAssetsFile)
at Microsoft.VisualStudio.Web.CodeGeneration.Design.Program.<>c__DisplayClass4_0.<<Execute>b__0>d.MoveNext()
RunTime 00:00:02.43
Reproduction Steps
Create a new project using the template "ASP.NET Core Web App (Model-View-Controller)" targeting .NET 6.0 and with the authentication type set to Individual Accounts.
Add the following Nuget package:
Microsoft.VisualStudio.Web.CodeGeneration.Design (to support scaffolding)
Save all files (Ctrl + Shift + S) and rebuild the solution.
At this point, open cmd to the project file's directory and run dotnet aspnet-codegenerator identity -lf to ensure the list of available Identity views for scaffolding is shown successfully.
Add the following Nuget package:
Microsoft.AspNetCore.Identity
Save all files (Ctrl + Shift + S) and rebuild the solution.
Try to re-run the command dotnet aspnet-codegenerator identity -lf and the above error should occur.
Environment Info
Target framework: .NET 6.0 IDE: Visual Studio 2022 17.0.1 Operating system: Windows Server 2016 Standard
Extragorey
changed the title
"Path not found" error when scaffolding in a project that references Microsoft.AspNetCore.Identity
"Path is empty" error when scaffolding in a project that references Microsoft.AspNetCore.Identity
Nov 29, 2021
Yup, don't reference Microsoft.AspNetCore.Identity. xD
But it wasn't actually required as a direct reference in my case; I could
install the Microsoft.AspNetCore.Identity.EntityFrameworkCore nuget package
instead, and that worked.
Issue
The following error is thrown when running the command
dotnet aspnet-codegenerator identity -lf
.The same error (sans stack trace) also occurs when attempting to scaffold any view via the IDE context menu.
Reproduction Steps
dotnet aspnet-codegenerator identity -lf
to ensure the list of available Identity views for scaffolding is shown successfully.dotnet aspnet-codegenerator identity -lf
and the above error should occur.Environment Info
Target framework: .NET 6.0
IDE: Visual Studio 2022 17.0.1
Operating system: Windows Server 2016 Standard
Issue originally posted on StackOverflow (by me).
The text was updated successfully, but these errors were encountered: