Starts in:
2 DAYS
11 HRS
11 MIN
10 SEC
Starts in:
2 D
11 H
11 M
10 S
Open Closed

error in Abp Suite #6270


User avatar
0
hussein created
  • ABP Framework version: v8.0.0-rc.2
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: the abp suite not conute until completed task, i have checked the generated files and found error in the generated code as the following

using Volo.Abp.EntityFrameworkCore.Modeling;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace BstCore.EntityFrameworkCore;
[ConnectionStringName(BstCoreDbProperties.ConnectionStringName)]
public interface IBstCoreDbContext : IEfCoreDbContext
{
    DbSet<PersonTitle> PersonTitles { get; set; } **= null!;**  <-----compiler : the error in the generated code ,interface property cannot have an initializer

    DbSet<Neighborhood> Neighborhoods { get; set; } //= null!;
    DbSet<Town> Towns { get; set; }//= null!;
    DbSet<District> Districts { get; set; }// = null!;
    DbSet<Region> Regions { get; set; }//= null!;
    DbSet<Country> Countries { get; set; }// = null!;
    /* Add DbSet for each Aggregate Root here. Example:
     * DbSet<Question> Questions { get; }
     */
}

noting that no error in the abp suite log file! just waiting

public class PersonTitlesAppServiceTests : BstCoreApplicationTestBase
{
    private readonly IPersonTitlesAppService _personTitlesAppService;
    private readonly IRepository<PersonTitle, int> _personTitleRepository;
    public PersonTitlesAppServiceTests()
    {
        _personTitlesAppService = GetRequiredService<IPersonTitlesAppService>();
        _personTitleRepository = GetRequiredService<IRepository<PersonTitle, int>>();
    }
    [Fact]
    public async Task GetListAsync()
    {
        // Act
        var result = await _personTitlesAppService.GetListAsync(new GetPersonTitlesInput());`

it should be fixed as the following code

public abstract class PersonTitlesAppServiceTests&lt;TStartupModule&gt; : BstCoreApplicationTestBase&lt;TStartupModule&gt;
 where TStartupModule : IAbpModule
{}
  • Steps to reproduce the issue: adding new module to the project, try to generate entities

2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    We will check it, if it's a bug, we will fix it and refund your ticket.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    I could reproduce the problem as you stated. Thanks for reporting, we have refunded your ticket and fix the problem asap.

    Best regards.

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