Ends in:
7 DAYS
11 HRS
29 MIN
14 SEC
Ends in:
7 D
11 H
29 M
14 S
Open Closed

Publishing DbMigrator Console App ABP-LIC-0020, ABP-LIC-0008 #1313


User avatar
0
raif created

I would like create "custom" db migrator console app for my customers. Migrator should handle both commercial and non-commercial modules tables.

Error indicates that:

2021-05-12 16:56:31.322 +03:00 [INF] Started database migrations... 2021-05-12 16:56:31.337 +03:00 [INF] Migrating schema for host database... 2021-05-12 16:57:03.844 +03:00 [ERR] ABP-LIC-0020 - License code not found! Ensure that your appsettings.json has "AbpLicenseCode" key with your license code. 2021-05-12 16:57:03.844 +03:00 [ERR] ABP-LIC-0008 - License check failed for 'Volo.Abp.Identity.Pro.Domain-v4.3.0.0'.

.cs proj

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <EnvironmentName>Production</EnvironmentName>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Stage|AnyCPU'">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <EnvironmentName>Staging</EnvironmentName>
  </PropertyGroup>

Set both ASPNETCORE_ENVIRONMENT and ENVIRONMENT to the Production / anything that different from 'Development'

I tried use launch via dotnet with "-e"

What am i missing ?


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Ensure that your appsettings.json has "AbpLicenseCode" key with your license code.

    Can you check the appsettings.json file?

  • User Avatar
    0
    raif created

    Ok, first of all, lets be agree on when license check operation will perform. https://support.abp.io/QA/Questions/69/#answer-d8bebebb-b714-3c1e-7fcb-39f437bc8ba3

    According to following anwser, license check should only perform if envrionment value set to the "Development" Then why i need to expose my developer AbpLicenseCode to end user ?

    Ensure that your appsettings.json has "AbpLicenseCode" key with your license code.

    Can you check the appsettings.json file?

    Why should i add license code to get rid off error message ?

    **Note **: My migration is working properly even if there is error message on the console screen

  • User Avatar
    0
    alper created
    Support Team Director

    Offline License Check is always being performed. Online license check is being performed when you are debugging or in Development environment.

  • User Avatar
    0
    alper created
    Support Team Director

    by the way you can set your AbpLicenseCode, nobody can use it without logging into abp.io via ABP CLI.

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