Issue in Migration DotNet Core during initial start. #138281
Replies: 2 comments
-
I suspect that within one of the following classes: Let me know if this helps! |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
When we create new project for Dot Net Core having Identity Framework for User, Role etc now we have try to do migration for these but got stuck and giving this error during add-migration comment.
An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: Method not found: 'System.Collections.Generic.IEnumerable
1<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType.GetProperties()'. Unable to create a 'DbContext' of type 'AuthDbContext'. The exception 'Method not found: 'System.Collections.Generic.IEnumerable
1<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType.GetProperties()'.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728DbContext :- `public class AuthDbContext : IdentityDbContext<User, Role, string>
{
#pragma warning disable 1591
#pragma warning restore 1591
}`
In Program.cs we describe their AddDbContextPool for configuration.
Can anyone suggest what mistake i done in the code.
Beta Was this translation helpful? Give feedback.
All reactions