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

Scaffold Not Working because dotnet-aspnet-codegenerator.exe uses old C# version #2616

Open
AlizerUncaged opened this issue Jan 10, 2024 · 1 comment

Comments

@AlizerUncaged
Copy link

AlizerUncaged commented Jan 10, 2024

I need help with scaffolding identity my C# project, I get this error whenever I scaffold

D:\ProjectFolder\ClientAction(81,37): error CS1002: ; expected

and I look into the line that causes this and I found it it's caused by the new required keyword

public class ClientAction
    {
        public required string Description { get; set; } // the required keyword causes this!
    }

The project builds successfully in dotnet rider, no problems at all, however when it runs dotnet-aspnet-codegenerator.exe to scaffold I get a lot of errors, I'm thinking it's caued by dotnet-aspnet-codegenerator.exe using an old c# version, currently I use .net 7.0

Now my problem is that I have around 100+ properties using required and I needed to scaffold the Identity to edit the register and login pages, how do I get around this?

Here is the full stack trace

Start checking required NuGet packages...
Checking 'Microsoft.EntityFrameworkCore.SqlServer' NuGet Package...
Checking 'Microsoft.EntityFrameworkCore.Tools' NuGet Package...
Checking 'Microsoft.AspNetCore.Identity.UI' NuGet Package...
Checking 'Microsoft.AspNetCore.Identity.EntityFrameworkCore' NuGet Package...
Checking 'Microsoft.VisualStudio.Web.CodeGeneration.Design' NuGet Package...
Building project 'fxCheckBetter'...
Check and install Code Generation tool...
Start scaffolding 'Identity'...
Running command: D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\obj\dotnet-aspnet-codegenerator.exe --project D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\fxCheckBetter.csproj --target-framework net7.0 --configuration "NoScrape" --no-build identity --dbContext fxCheckBetter.Data.ApplicationDbContext --files "Account.Manage.ChangePassword;Account.Manage.DeletePersonalData;Account.Manage.Disable2fa;Account.Manage.DownloadPersonalData;Account.Manage.Email;Account.Manage.EnableAuthenticator;Account.Manage.ExternalLogins;Account.Manage.GenerateRecoveryCodes;Account.Manage.Index;Account.Manage.PersonalData;Account.Manage.ResetAuthenticator;Account.Manage.SetPassword;Account.Manage.ShowRecoveryCodes;Account.Manage.TwoFactorAuthentication;Account.Manage._Layout;Account.Manage._ManageNav;Account.Manage._StatusMessage;Account.AccessDenied;Account.ConfirmEmail;Account.ConfirmEmailChange;Account.ExternalLogin;Account.ForgotPassword;Account.ForgotPasswordConfirmation;Account.Lockout;Account.Login;Account.LoginWith2fa;Account.LoginWithRecoveryCode;Account.Logout;Account.Register;Account.RegisterConfirmation;Account.ResendEmailConfirmation;Account.ResetPassword;Account.ResetPasswordConfirmation;Account._StatusMessage" --layout ~/Pages/Shared/_Layout.cshtml
Finding the generator 'identity'...
Running the generator 'identity'...
Failed to compile the project in memory
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,37): error CS1002: ; expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookTitle.cs(40,21): error CS1519: Invalid token 'string' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,33): error CS1002: ; expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,32): error CS1001: Identifier expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,45): error CS1519: Invalid token '{' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,43): error CS1519: Invalid token '{' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,45): error CS1519: Invalid token '{' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,50): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,43): error CS1519: Invalid token '{' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,48): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,48): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,50): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,53): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,55): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,53): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,55): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,32): error CS1003: Syntax error, '>' expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,36): error CS1002: ; expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(9,1): error CS1022: Type or namespace definition, or end-of-file expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,32): error CS1003: Syntax error, '(' expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,41): error CS1519: Invalid token '{' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,41): error CS1519: Invalid token '{' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,38): error CS1001: Identifier expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,46): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,64): error CS1001: Identifier expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,46): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,64): error CS1003: Syntax error, ',' expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,51): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,66): error CS1003: Syntax error, ',' expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,79): error CS1001: Identifier expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,51): error CS1519: Invalid token ';' in class, record, struct, or interface member declaration
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,79): error CS1026: ) expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(84,5): error CS1022: Type or namespace definition, or end-of-file expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(86,5): error CS8803: Top-level statements must precede namespace and type declarations.
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,46): error CS1003: Syntax error, '(' expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,59): error CS1001: Identifier expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,59): error CS1026: ) expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(87,5): error CS0106: The modifier 'public' is not valid for this item
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(96,1): error CS1022: Type or namespace definition, or end-of-file expected
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Program.cs(14,1): error CS8802: Only one compilation unit can have top-level statements.
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,46): error CS0246: The type or namespace name 'BookTitles' could not be found (are you missing a using directive or an assembly reference?)
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,12): error CS0246: The type or namespace name 'required' could not be found (are you missing a using directive or an assembly reference?)
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,66): error CS0246: The type or namespace name 'BookTitles' could not be found (are you missing a using directive or an assembly reference?)
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,12): error CS0246: The type or namespace name 'required' could not be found (are you missing a using directive or an assembly reference?)
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,12): error CS0246: The type or namespace name 'required' could not be found (are you missing a using directive or an assembly reference?)
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,16): error CS0246: The type or namespace name 'required' could not be found (are you missing a using directive or an assembly reference?)
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,16): error CS0246: The type or namespace name 'required' could not be found (are you missing a using directive or an assembly reference?)
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Pages\Index.cshtml.cs(28,13): error CS0117: 'BookCollectionArea' does not contain a definition for 'BookTitles'
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\SearchController.cs(30,13): error CS0117: 'BookCollectionArea' does not contain a definition for 'BookTitles'
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,81): error CS0103: The name 'get' does not exist in the current context
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,81): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,86): error CS0103: The name 'set' does not exist in the current context
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,86): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,21): error CS0161: 'CharacterCollectionArea.Dictionary<>(string, IEnumerable<BookTitle>, BookTitles)': not all code paths return a value
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\ThumbnailHandler.cs(37,40): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection level
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(44,13): error CS0117: 'BookController.BookPageModel' does not contain a definition for 'Title'
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(44,29): error CS0117: 'BookController.BookPageModel' does not contain a definition for 'Page'
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(89,28): error CS0103: The name '_doujins' does not exist in the current context
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(92,20): error CS0103: The name 'RedirectToAction' does not exist in the current context
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(94,16): error CS0103: The name 'View' does not exist in the current context
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,61): error CS0103: The name 'get' does not exist in the current context
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,61): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,66): error CS0103: The name 'set' does not exist in the current context
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,66): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,21): error CS0161: 'BookCollectionArea.IEnumerable<BookTitle>(BookTitles)': not all code paths return a value
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Books.cs(38,76): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection level
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\CharactersController.cs(31,13): error CS0117: 'CharacterCollectionArea' does not contain a definition for 'BookTitles'
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\CharactersController.cs(39,49): error CS1061: 'CharacterCollectionArea' does not contain a definition for 'BookTitles' and no accessible extension method 'BookTitles' accepting a first argument of type 'CharacterCollectionArea' could be found (are you missing a using directive or an assembly reference?)
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Utilities\SchemaExtensions.cs(25,38): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection level
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Utilities\SchemaExtensions.cs(27,31): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection level
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Scrapers\eCheckPages.cs(137,41): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection level
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Scrapers\eCheck.cs(46,42): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection level
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Utilities\SchemaExtensions.cs(49,43): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection level
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Scrapers\eCheckCollection.cs(77,65): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection level
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Scrapers\eCheckBook.cs(49,13): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection level
D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Books.cs(364,80): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection level
   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:07.42
Scaffolding 'Identity' has finished with errors:
 * Scaffold item command has finished with error: Failed to compile the project in memoryD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,37): error CS1002: ; expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookTitle.cs(40,21): error CS1519: Invalid token 'string' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,33): error CS1002: ; expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,32): error CS1001: Identifier expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,45): error CS1519: Invalid token '{' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,43): error CS1519: Invalid token '{' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,45): error CS1519: Invalid token '{' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,50): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,43): error CS1519: Invalid token '{' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,48): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,48): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,50): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,53): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,55): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,53): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,55): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,32): error CS1003: Syntax error, '>' expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,36): error CS1002: ; expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(9,1): error CS1022: Type or namespace definition, or end-of-file expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,32): error CS1003: Syntax error, '(' expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,41): error CS1519: Invalid token '{' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,41): error CS1519: Invalid token '{' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,38): error CS1001: Identifier expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,46): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,64): error CS1001: Identifier expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,46): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,64): error CS1003: Syntax error, ',' expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,51): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,66): error CS1003: Syntax error, ',' expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,79): error CS1001: Identifier expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,51): error CS1519: Invalid token ';' in class, record, struct, or interface member declarationD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,79): error CS1026: ) expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(84,5): error CS1022: Type or namespace definition, or end-of-file expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(86,5): error CS8803: Top-level statements must precede namespace and type declarations.D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,46): error CS1003: Syntax error, '(' expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,59): error CS1001: Identifier expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,59): error CS1026: ) expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(87,5): error CS0106: The modifier 'public' is not valid for this itemD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(96,1): error CS1022: Type or namespace definition, or end-of-file expectedD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Program.cs(14,1): error CS8802: Only one compilation unit can have top-level statements.D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,46): error CS0246: The type or namespace name 'BookTitles' could not be found (are you missing a using directive or an assembly reference?)D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,12): error CS0246: The type or namespace name 'required' could not be found (are you missing a using directive or an assembly reference?)D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,66): error CS0246: The type or namespace name 'BookTitles' could not be found (are you missing a using directive or an assembly reference?)D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,12): error CS0246: The type or namespace name 'required' could not be found (are you missing a using directive or an assembly reference?)D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\SearchResultsMetadataModel.cs(8,12): error CS0246: The type or namespace name 'required' could not be found (are you missing a using directive or an assembly reference?)D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(83,16): error CS0246: The type or namespace name 'required' could not be found (are you missing a using directive or an assembly reference?)D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(81,16): error CS0246: The type or namespace name 'required' could not be found (are you missing a using directive or an assembly reference?)D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Pages\Index.cshtml.cs(28,13): error CS0117: 'BookCollectionArea' does not contain a definition for 'BookTitles'D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\SearchController.cs(30,13): error CS0117: 'BookCollectionArea' does not contain a definition for 'BookTitles'D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,81): error CS0103: The name 'get' does not exist in the current contextD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,81): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statementD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,86): error CS0103: The name 'set' does not exist in the current contextD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,86): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statementD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\CharacterCollectionArea.cs(5,21): error CS0161: 'CharacterCollectionArea.Dictionary<>(string, IEnumerable<BookTitle>, BookTitles)': not all code paths return a valueD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\ThumbnailHandler.cs(37,40): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection levelD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(44,13): error CS0117: 'BookController.BookPageModel' does not contain a definition for 'Title'D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(44,29): error CS0117: 'BookController.BookPageModel' does not contain a definition for 'Page'D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(89,28): error CS0103: The name '_doujins' does not exist in the current contextD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(92,20): error CS0103: The name 'RedirectToAction' does not exist in the current contextD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\BookController.cs(94,16): error CS0103: The name 'View' does not exist in the current contextD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,61): error CS0103: The name 'get' does not exist in the current contextD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,61): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statementD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,66): error CS0103: The name 'set' does not exist in the current contextD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,66): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statementD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Models\BookCollectionArea.cs(7,21): error CS0161: 'BookCollectionArea.IEnumerable<BookTitle>(BookTitles)': not all code paths return a valueD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Books.cs(38,76): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection levelD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\CharactersController.cs(31,13): error CS0117: 'CharacterCollectionArea' does not contain a definition for 'BookTitles'D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Controllers\CharactersController.cs(39,49): error CS1061: 'CharacterCollectionArea' does not contain a definition for 'BookTitles' and no accessible extension method 'BookTitles' accepting a first argument of type 'CharacterCollectionArea' could be found (are you missing a using directive or an assembly reference?)D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Utilities\SchemaExtensions.cs(25,38): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection levelD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Utilities\SchemaExtensions.cs(27,31): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection levelD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Scrapers\eCheckPages.cs(137,41): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection levelD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Scrapers\eCheck.cs(46,42): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection levelD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Utilities\SchemaExtensions.cs(49,43): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection levelD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Scrapers\eCheckCollection.cs(77,65): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection levelD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Scrapers\eCheckBook.cs(49,13): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection levelD:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\Data\Books.cs(364,80): error CS0122: 'BookTitle.BookName' is inaccessible due to its protection level
 * ```

### Include provider and version information

Microsoft.VisualStudio.Web.CodeGeneration.Design/Microsoft.DotNet.MSIdentity version: 7.0.0
Target framework: (e.g. .NET 6.0) .net 7.0
Operating system: Windows 11
IDE:: dotnet rider / vs 2022 tested on both
@AlizerUncaged
Copy link
Author

AlizerUncaged commented Jan 10, 2024

Update: IT WORKED, I HAD TO REMOVED THE DBCONTEXT IN THE ARGUMENTS
i have no idea why but I read at #2510 (comment)

for some reason removing the dbcontext in the arguments worked!
Didn't work:

D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\obj\dotnet-aspnet-codegenerator.exe --project D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\fxCheckBetter.csproj --target-framework net7.0 --configuration "NoScrape" --no-build identity --dbContext fxCheckBetter.Data.ApplicationDbContext --files "Account.Manage.ChangePassword;Account.Manage.DeletePersonalData;Account.Manage.Disable2fa;Account.Manage.DownloadPersonalData;Account.Manage.Email;Account.Manage.EnableAuthenticator;Account.Manage.ExternalLogins;Account.Manage.GenerateRecoveryCodes;Account.Manage.Index;Account.Manage.PersonalData;Account.Manage.ResetAuthenticator;Account.Manage.SetPassword;Account.Manage.ShowRecoveryCodes;Account.Manage.TwoFactorAuthentication;Account.Manage._Layout;Account.Manage._ManageNav;Account.Manage._StatusMessage;Account.AccessDenied;Account.ConfirmEmail;Account.ConfirmEmailChange;Account.ExternalLogin;Account.ForgotPassword;Account.ForgotPasswordConfirmation;Account.Lockout;Account.Login;Account.LoginWith2fa;Account.LoginWithRecoveryCode;Account.Logout;Account.Register;Account.RegisterConfirmation;Account.ResendEmailConfirmation;Account.ResetPassword;Account.ResetPasswordConfirmation;Account._StatusMessage" --layout ~/Pages/Shared/_Layout.cshtml

Worked:

dotnet-aspnet-codegenerator --project D:\Users\flandre-real\RiderProjects\fxCheckBetter\fxCheckBetter\fxCheckBetter.csproj --target-framework net8.0 --configuration "NoScrape" identity  --files "Account.Manage.ChangePassword;Account.Manage.DeletePersonalData;Account.Manage.Disable2fa;Account.Manage.DownloadPersonalData;Account.Manage.Email;Account.Manage.EnableAuthenticator;Account.Manage.ExternalLogins;Account.Manage.GenerateRecoveryCodes;Account.Manage.Index;Account.Manage.PersonalData;Account.Manage.ResetAuthenticator;Account.Manage.SetPassword;Account.Manage.ShowRecoveryCodes;Account.Manage.TwoFactorAuthentication;Account.Manage._Layout;Account.Manage._ManageNav;Account.Manage._StatusMessage;Account.AccessDenied;Account.ConfirmEmail;Account.ConfirmEmailChange;Account.ExternalLogin;Account.ForgotPassword;Account.ForgotPasswordConfirmation;Account.Lockout;Account.Login;Account.LoginWith2fa;Account.LoginWithRecoveryCode;Account.Logout;Account.Register;Account.RegisterConfirmation;Account.ResendEmailConfirmation;Account.ResetPassword;Account.ResetPasswordConfirmation;Account._StatusMessage" --layout ~/Pages/Shared/_Layout.cshtml

And now I have all the identity areas
image

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

No branches or pull requests

1 participant