Open Closed

Can not add Entity to Main solution #9023


User avatar
0
viktor created

Hi,
steps to reproduce:

  1. Create new solution [DemoSolution]

  2. Add new Module [FirstModule] -> Install module to [DemoSolution]. Graph Build. OK.

  3. Create new Entity in [main]. Failed. Error on build. Errors are in [FirstModule].

09:19:29.691 Information Starting task execution: "Building: DemoSolution"
09:19:31.503 Information CLI command executed. Command: "dotnet build -v:q /property:WarningLevel=0 /clp:ErrorsOnly /graphBuild"
Working directory: "D:\DemoSolution"
CommandResult { ExitCode: 1, IsSuccess: False, StartTime: 03/24/2025 09:19:29 +02:00, ExitTime: 03/24/2025 09:19:31 +02:00, RunTime: 00:00:01.8069407 }
09:19:31.503 Information Failed task execution: "Building: DemoSolution"
09:19:31.503 Information ERROR: "An error has occured!"
09:19:31.503 Information ERROR DETAILS: "Dotnet build failed for the project \"DemoSolution\". Details: D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.Extended.cs(17,65): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.Extended.cs(19,36): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(28,72): error CS0246: The type or namespace name 'GetPromotionsInput' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(28,44): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(35,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(41,55): error CS0246: The type or namespace name 'PromotionCreateDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(41,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(48,64): error CS0246: The type or namespace name 'PromotionUpdateDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(48,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(20,19): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(22,40): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
Build FAILED.
0 Warning(s)
11 Error(s)
Time Elapsed 00:00:01.60
Workload updates are available. Run `dotnet workload list` for more information."
09:19:31.503 Information Exception of type 'Volo.Abp.Studio.AbpStudioException' was thrown.
09:19:31.503 Information Code:AbpStudio:DotnetBuildFailed
09:19:31.503 Information Details:
09:19:31.504 Information ---------- Exception Data ----------
ProjectName = DemoSolution
Details = D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.Extended.cs(17,65): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.Extended.cs(19,36): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(28,72): error CS0246: The type or namespace name 'GetPromotionsInput' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(28,44): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(35,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(41,55): error CS0246: The type or namespace name 'PromotionCreateDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(41,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(48,64): error CS0246: The type or namespace name 'PromotionUpdateDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(48,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(20,19): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\Controllers\Promotions\PromotionController.cs(22,40): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [D:\DemoSolution\firstmodule\src\FirstModule.HttpApi\FirstModule.HttpApi.csproj]
Build FAILED.
0 Warning(s)
11 Error(s)
Time Elapsed 00:00:01.60
Workload updates are available. Run `dotnet workload list` for more information.


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

    Hi, can you explain the 3rd step in detail, please? It seems you created an entity via ABP Suite, but I need more details on the entity and if possible complete details to reproduce the problem.

    For example, as far as I understand, you have selected the DemoSolution, and then created a Promition entity, right?

    image.png

    Regards.

  • User Avatar
    0
    viktor created

    Hi, EngincanV
    All steps are described in https://abp.io/support/questions/9011/No-db-migrations-for-Entities-in-Modules
    because this different kind of issue I created separate ticket.
    Yes, I created new Entity [Promotion] in [DemoSolution] and click "Save and generate":

    image.png

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, EngincanV
    All steps are described in https://abp.io/support/questions/9011/No-db-migrations-for-Entities-in-Modules
    because this different kind of issue I created separate ticket.
    Yes, I created new Entity [Promotion] in [DemoSolution] and click "Save and generate":

    image.png

    Hi, thanks for sharing the steps. I'll check and let you know asap. Regards.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi again, I have checked but unfortunately could not reproduce the problem:

    image.png

    image.png

    image.png

  • User Avatar
    0
    viktor created

    Hi, EngincanV
    I created new Entity [Promotion] in [DemoSolution] and NOT in [FirstModule].
    Issus is during adding new Entity to [DemoSolution].

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, EngincanV
    I created new Entity [Promotion] in [DemoSolution] and NOT in [FirstModule].
    Issus is during adding new Entity to [DemoSolution].

    Hi, since you mentioned that you selected FirstModule to generate CRUD pages (in this thread), I have tried on that solution.

    Now, I have tried on DemoSolution and still not able to reproduce:

    image.png

    image.png

    image.png

    Used the entity name as PromotionOnDemoSln but it does not matter.


    I have followed your steps but unable to produce the problem. (Check the thread and your steps provided).

    So, please try to create in a fresh solution and share the exact steps with me, so I can reproduce the problem.

    Regards.

  • User Avatar
    0
    viktor created

    Hi, EngincanV
    Please find below steps I did with new solution and got again same error:

    1. Create new [DemoSolution2] - Single layered.

    2. Add [NewModule] - DDD Module

    3. Import and Install [NewModule] into [DemoSolution2]

    4. Graph build. OK
      image.png

    5. Open APB Suite. Select [DemoSolution2]

    6. Add new Entity [Promotion] with one property [Title]. Click "Save and generate" -> Failed. Error below.

    My question: Why some program code about [Promotion] are added into [NewModule]? I am trying to add it into [DemoSolution2], so why cli trying to add something into module?

    image.png

    error:
    `16:53:15.518 Information Starting task execution: "Building: DemoSolution2"
    16:53:17.290 Information CLI command executed. Command: "dotnet build -v:q /property:WarningLevel=0 /clp:ErrorsOnly /graphBuild"
    Working directory: "C:\Temp\DemoSolution2"
    CommandResult { ExitCode: 1, IsSuccess: False, StartTime: 03/26/2025 16:53:15 +02:00, ExitTime: 03/26/2025 16:53:17 +02:00, RunTime: 00:00:01.7670903 }
    16:53:17.290 Information Failed task execution: "Building: DemoSolution2"
    16:53:17.290 Information ERROR: "An error has occured!"
    16:53:17.290 Information ERROR DETAILS: "Dotnet build failed for the project "DemoSolution2". Details: C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.Extended.cs(17,65): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.Extended.cs(19,36): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(28,72): error CS0246: The type or namespace name 'GetPromotionsInput' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(28,44): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(35,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(41,55): error CS0246: The type or namespace name 'PromotionCreateDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(41,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(48,64): error CS0246: The type or namespace name 'PromotionUpdateDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(48,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(20,19): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(22,40): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]

    Build FAILED.
    0 Warning(s)
    11 Error(s)

    Time Elapsed 00:00:01.55

    Workload updates are available. Run dotnet workload list for more information."
    16:53:17.290 Information Exception of type 'Volo.Abp.Studio.AbpStudioException' was thrown.
    16:53:17.290 Information Code:AbpStudio:DotnetBuildFailed
    16:53:17.290 Information Details:
    16:53:17.291 Information ---------- Exception Data ----------
    ProjectName = DemoSolution2
    Details = C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.Extended.cs(17,65): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.Extended.cs(19,36): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(28,72): error CS0246: The type or namespace name 'GetPromotionsInput' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(28,44): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(35,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(41,55): error CS0246: The type or namespace name 'PromotionCreateDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(41,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(48,64): error CS0246: The type or namespace name 'PromotionUpdateDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(48,29): error CS0246: The type or namespace name 'PromotionDto' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(20,19): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]
    C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\Controllers\Promotions\PromotionController.cs(22,40): error CS0246: The type or namespace name 'IPromotionsAppService' could not be found (are you missing a using directive or an assembly reference?) [C:\Temp\DemoSolution2\newmodule\src\NewModule.HttpApi\NewModule.HttpApi.csproj]

    Build FAILED.
    0 Warning(s)
    11 Error(s)

    Time Elapsed 00:00:01.55

    Workload updates are available. Run dotnet workload list for more information.`

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, I'm unable to reproduce your problem. Tried applying each step you provided but could not reproduce it. Your problems seem to be related to that you have not built your solution.

    Please get a graphBuild on your solution (dotnet build /graphbuild) and see if really there is any build error. If still there are build errors, share your solution via email (to support@abp.io with ticket number), so I can check your solution. Since, could not produce the problem with the specified steps, I'm unable to help you at that point and waiting for your confirmation.

    Regards.

  • User Avatar
    0
    viktor created

    Hi, EngincanV
    I did build. See my Step 4. Graph build. OK
    I can not add new Entity to [DemoSolution2] using ABP Suite. After adding it gives me error and I can not build using graph due to errors in module. So you did not answer my quition: why my module [NewModule] is impacted if I am adding entity into [DemoSolution2]?

    I will share solution soon.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, EngincanV
    I did build. See my Step 4. Graph build. OK
    I can not add new Entity to [DemoSolution2] using ABP Suite. After adding it gives me error and I can not build using graph due to errors in module. So you did not answer my quition: why my module [NewModule] is impacted if I am adding entity into [DemoSolution2]?

    I will share solution soon.

    Thanks. I got your email, and will check the problem.

  • User Avatar
    0
    viktor created

    Hi, EngincanV
    We are blocked with our solution due to this issue. Any updates on this?

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, EngincanV
    We are blocked with our solution due to this issue. Any updates on this?

    Hi, I got your solution. But haven't had time to examine it yet. I'll check it asap.

  • User Avatar
    0
    viktor created

    Hi, EngincanV
    Sorry for pushing.. any news?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi viktor

    EngincanV will be back to work tomorrow. He will reply you asap

    Thanks.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 25, 2025, 11:10