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

AddUsingDirectiveIfNeeded is whitespace-sensitive #1788

Open
yecril71pl opened this issue Jan 8, 2022 · 0 comments · May be fixed by #1789
Open

AddUsingDirectiveIfNeeded is whitespace-sensitive #1788

yecril71pl opened this issue Jan 8, 2022 · 0 comments · May be fixed by #1789

Comments

@yecril71pl
Copy link
Contributor

File a bug

Include your code

using Microsoft .Extensions .DependencyInjection;

Include stack traces

      System.AggregateException: One or more errors occurred. (There was an error creating a DbContext :/home/dell/prog/Scaffolding/tools/dotnet-aspnet-codegenerator/Startup.cs(7,7): warning CS0105: Dyrektywa using dla elementu „Microsoft.Extensions.DependencyInjection” już wystąpiła w tej przestrzeni nazw
         at Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.EntityFrameworkModelProcessor.Process() in /home/dell/prog/Scaffolding/src/Scaffolding/VS.Web.CG.EFCore/EntityFrameworkModelProcessor.cs:line 226
         at Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.EntityFrameworkServices.GetModelMetadata(String dbContextFullTypeName, ModelType modelTypeSymbol, String areaName, Boolean useSqlite) in /home/dell/prog/Scaffolding/src/Scaffolding/VS.Web.CG.EFCore/EntityFrameworkServices.cs:line 138
         at Microsoft.VisualStudio.Web.CodeGenerators.Mvc.ModelMetadataUtilities.ValidateModelAndGetEFMetadata(CommonCommandLineModel commandLineModel, IEntityFrameworkService entityFrameworkService, IModelTypesLocator modelTypesLocator, String areaName) in /home/dell/prog/Scaffolding/src/Scaffolding/VS.Web.CG.Mvc/ModelMetadataUtilities.cs:line 52
         at Microsoft.VisualStudio.Web.CodeGenerators.Mvc.Razor.EFModelBasedRazorPageScaffolder.GenerateCode(RazorPageGeneratorModel razorGeneratorModel) in /home/dell/prog/Scaffolding/src/Scaffolding/VS.Web.CG.Mvc/RazorPage/EFModelBasedRazorPageScaffolder.cs:line 93
         at Microsoft.VisualStudio.Web.CodeGenerators.Mvc.Razor.RazorPageGenerator.GenerateCode(RazorPageGeneratorModel razorPageGeneratorModel) in /home/dell/prog/Scaffolding/src/Scaffolding/VS.Web.CG.Mvc/RazorPage/RazorPageGenerator.cs:line 82
         --- End of inner exception stack trace ---
         at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
         at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
         at System.Threading.Tasks.Task.Wait()
         at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.<BuildCommandLine>b__8_0() in /home/dell/prog/Scaffolding/src/Scaffolding/VS.Web.CG.Core/ActionInvoker.cs:line 102
         at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args) in /home/dell/.nuget/packages/microsoft.extensions.commandlineutils.sources/6.0.0-preview.3.21166.3/contentFiles/cs/netstandard1.0/CommandLine/CommandLineApplication.cs:line 374
         at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.Execute() in /home/dell/prog/Scaffolding/src/Scaffolding/VS.Web.CG.Core/ActionInvoker.cs:line 54
         at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute() in /home/dell/prog/Scaffolding/src/Scaffolding/VS.Web.CG/CodeGenCommand.cs:line 93

Include provider and version information

Microsoft.VisualStudio.Web.CodeGeneration.Design/Microsoft.DotNet.MSIdentity version:
1.0.0
Target framework: (e.g. .NET 5.0)
6.0.1
Operating system:
Linux x64 5.15.12-1-default
IDE: (e.g. Visual Studio 2019 16.3)
1.63.2
@yecril71pl yecril71pl changed the title EditStartupForNewContext is whitespace-sensitive AddUsingDirectiveIfNeeded is whitespace-sensitive Jan 8, 2022
yecril71pl added a commit to yecril71pl/Scaffolding that referenced this issue Jan 8, 2022
@yecril71pl yecril71pl linked a pull request Jan 8, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants