Closed rutenio closed 5 years ago
Hello! Can you please put the full error message?
An error occurred while starting the application. AmbiguousMatchException: Multiple custom attributes of the same type found. System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, bool inherit)
AmbiguousMatchException: Multiple custom attributes of the same type found.
System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, bool inherit)
System.Reflection.CustomAttributeExtensions.GetCustomAttribute
And what about your actions (routes)? Are you adding multiple BreadcrumbAttributes to one of them by any chance?
My only route setting is:
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
I mean your action methods (the ones with IActionResult)
I haven't route config in my methods. I use the Default route. And I deleted the SmartbreadCrumb settings from the controllers and the error persists.
I don't really understand, do you not have actions in your whole website? Not even an Index?
Of course I have:
// GET: Tickets
public async Task
foreach (var item in tkt)
{
item.Cliente = cliente.Find(c => c.Id == item.ClienteId);
}
return View(tkt);
}
I haven't extra routes settings.
In short, even if I only change my startup.cs file and nothing else in my project, I get the error above.
I understand you but the error says you're using multiple Breadcrumb attributes on the same action. Please check.
Okay. I started a new project to test and find out where I was going wrong. The DefaultBreadcrumb parameter was in the same controller as I wanted the breadcrumbs, which was not the HOME controller. I switched to the Home controller and it worked. I do not know exactly if it has a relationship, but now it works fine. I apologize, but the documentation was not very clear.
Hello. I'm having trouble setting up the service. In the file startup.cs I put: using SmartBreadcrumbs; and service configuration: services.UseBreadcrumbs (GetType (). Assembly); But when build it, I get the error: AmbiguousMatchException: Multiple custom attributes of the same type found.