Open Closed

Partial class APPNAME_DbContextModelSnapshot : ModelSnapshot Compile Errors #5798


User avatar
0
SuperBeastX3 created
  • ABP Framework version: v7.3.3
  • UI Type: MVC
  • Database System: EF Core SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue: Use ABP suite to generate a new solution, create a new class in abp suite, it creates a partial DBContextModelSnapshot file. This file has compile errors for Duplicate DbContext attribute and a duplicate BuildModel function.

3 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi @SuperBeastX3, I will check and write back to you asap.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, this file is being created/updated automatically by the dotnet-ef CLI whenever a new migration is added.

    The problem that you are facing with this file is not related to ABP & ABP Suite because we are not making any changes to this file, we are just running the related dotnet-ef command (dotnet ef add migrations <migration-name>) under the hood to create a new migration.

  • User Avatar
    0
    SuperBeastX3 created

    It turns out it was just a fault combination of the abp suite generator. I did not successfully choose all the right options on the create new project screen.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11