C
C#2y ago
morry329#

A series of errors (Install failed & Minimal hosting scenario!) while scaffolding for a ASP.NET Core

I followed this instruction to execute the
API Controller with views, using Entity Framework
API Controller with views, using Entity Framework
https://blog.jetbrains.com/dotnet/2021/03/18/scaffolding-for-asp-net-core-projects-comes-to-rider-2021-1/#ASPNET_Web_API_Scaffolding And I just ended up with a bunch of errors. Two error dialogues popped up:
Minimal hosting scenario!
Attempting to compile the application in memory.
Attempting to figure out the EntityFramework metadata for the model and DbContext: 'Product'
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
Entity Framework Core 6.0.7 initialized 'NorthwindContext' using provider 'Pomelo.EntityFrameworkCore.MySql:6.0.2' with options: ServerVersion 8.0.23-mysql
Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621)
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.75
Scaffolding 'ApiControllerEntityFramework' has finished with errors:
* Scaffold item command has finished with error: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621)
Minimal hosting scenario!
Attempting to compile the application in memory.
Attempting to figure out the EntityFramework metadata for the model and DbContext: 'Product'
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
Entity Framework Core 6.0.7 initialized 'NorthwindContext' using provider 'Pomelo.EntityFrameworkCore.MySql:6.0.2' with options: ServerVersion 8.0.23-mysql
Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621)
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.75
Scaffolding 'ApiControllerEntityFramework' has finished with errors:
* Scaffold item command has finished with error: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621)
And the second one, please see the attached screenshot. I could not copy & paste the whole error message. What I tried: like the errors implied I have tried to match all the NugetPlugin versions to 6.0.2 (right now I only have Microsoft.EntityFrameworkCore.Design and Pomelo.EntityFrameworkCore.MySql . But the second error says there is still a version conflict :/. Any insights?
The JetBrains Blog
Scaffolding for ASP.NET Core projects comes to Rider 2021.1 | The ....
In the Rider 2021.1 Early Access Program (EAP) builds, we’re bringing you.... Scaffolding! Scaffolding makes development using ASP.NET MVC, ASP.NET Web API, or Razor Pages faster and more smooth. Let’
3 Replies
Mayor McCheese
Are you following an old tutorial?
morry329#
morry329#2y ago
Is there a latest tutorial then? I know this is a strange question
morry329#
morry329#2y ago
So I just found a solution. I downgraded all my NugetPlugins Microsoft.EntityFrameworkCore and Pomelo.EntityFrameworkCore.MySql to 6.0.0 . Then I tried scaffolding as per this tutorial still https://blog.jetbrains.com/dotnet/2021/03/18/scaffolding-for-asp-net-core-projects-comes-to-rider-2021-1/#ASPNET_Web_API_Scaffolding Now the scaffolding was successful
The JetBrains Blog
Scaffolding for ASP.NET Core projects comes to Rider 2021.1 | The ....
In the Rider 2021.1 Early Access Program (EAP) builds, we’re bringing you.... Scaffolding! Scaffolding makes development using ASP.NET MVC, ASP.NET Web API, or Razor Pages faster and more smooth. Let’