Base solution for your next web application
Open Closed

Troubleshoot RAD #6366


User avatar
0
geek1913 created

Running ASP.Net Core & Angular 6.5.0. Tried to add a new form with the RAD Tool and get this. ... -> CustomDtoMapper.cs is being modified. Running add-migration... Build failed. -> events.component.ts is being generated. ...

Is there a way to see what failed or why?


4 Answer(s)
  • User Avatar
    0
    yekalkan created

    Yes.

    Build your solution to see the error.

  • User Avatar
    0
    geek1913 created

    Thanks, that kinda helped. :) I dislike things that break for no reason. Here are the steps I followed.

    1. Run RAD, get "Build failed."
    2. Build Solution from VS - worked with no errors.
    3. Add-Migration manually in VS - worked with no errors.
    4. Close everything\reboot
    5. Run RAD again, get "Build failed."
    6. Ask for help here, and got answer to do something I've already done. (but it gave me an idea)
    7. Run "Delete-BIN-OBJ-Folders.bat"
    8. Test Build Solution from VS again - worked with no errors.
    9. Run "Delete-BIN-OBJ-Folders.bat" again
    10. Run RAD, success!!!

    I've seen VS get messed up where you can't build the solution unless you delete the BINs (not for a long time but it's happened). I've never seen VS build, but something else fail. I'll add running Delete-BIN-OBJ-Folders.bat to my best practices for using RAD.

  • User Avatar
    0
    geek1913 created

    Disregard...seem to have had a false positive in that testing. Real issue is that I tried to use an "Entity Name" of "Event"

    This causes atlease 2 problems. First and biggest is that "event" is a special name in C# so the generated code blows up on things like: public async Task<GetEventForEditOutput> GetEventForEdit(EntityDto<Guid> input) { var event = await _eventRepository.FirstOrDefaultAsync(input.Id); var output = new GetEventForEditOutput {Event = ObjectMapper.Map<CreateOrEditEventDto>(event)}; return output; }

    The other and smaller one is the way varibles are picked for {ProjectName}DbContext.cs. It seems to use the first letter of the "Entity Name" which if it starts with an E causes this variable overload problem... modelBuilder.Entity<Event>(e => { e.HasIndex(e => new { e.TenantId }); });

    Anyway, I'll send a bug about the E based Names and maybe a suggestion to add some validations to the Entity Name fields. :)

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @geek1913 :)