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)
-
0
Yes.
Build your solution to see the error.
-
0
Thanks, that kinda helped. :) I dislike things that break for no reason. Here are the steps I followed.
- Run RAD, get "Build failed."
- Build Solution from VS - worked with no errors.
- Add-Migration manually in VS - worked with no errors.
- Close everything\reboot
- Run RAD again, get "Build failed."
- Ask for help here, and got answer to do something I've already done. (but it gave me an idea)
- Run "Delete-BIN-OBJ-Folders.bat"
- Test Build Solution from VS again - worked with no errors.
- Run "Delete-BIN-OBJ-Folders.bat" again
- 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.
-
0
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. :)
-
0
Thanks @geek1913 :)