Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Exception when running Update-Database #2622


User avatar
0
bilalhaidar created

Hi, I am getting the following exception when running Update-Database. any idea why?

PM> Update-Database
Specify the '-Verbose' flag to view the SQL statements being applied to the target database.
No pending explicit migrations.
Running Seed method.
System.Runtime.Serialization.SerializationException: Type is not resolved for member 'Abp.AbpException,Abp, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null'.
   at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
   at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
   at System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMigration, Boolean force)
   at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
   at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Type is not resolved for member 'Abp.AbpException,Abp, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null'.

2 Answer(s)
  • User Avatar
    0
    bilalhaidar created

    Problem solved.

    My entity belongs to a Tenant. I was not supplying TenantId for the entity.

    In case someone faces same issue, you just make sure to set TenantId on the new entity.

    Regards Bilal

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks for sharing the solution as well :)