-
Notifications
You must be signed in to change notification settings - Fork 318
Improve error message for "No parameterless constructor defined for this object" #310
Comments
@pranavkm Why should I get this incomplete error message while using ASP.NET Core 1.0 ? StackTrace:
project.json
|
@mafshin I don't see DI anywhere in the stack trace here. |
As I said here(aspnet/Mvc#4991) the misleading
|
@pranavkm The error would be nice to tell me which service in the DI is causing this issue, instead of me hunting it down. |
@mohamedmansour do you have a stack trace for the error? We fixed the issue in the 1.0.0-rc2 milestone, so you shouldn't see this message coming from DI anymore. |
This error message will manifest if a constructor is private, but is a dependency of another class. The following exception is thrown in beta7:
It would be great if the message would identify the type with the missing constructor. Otherwise, one must resort to binary search debugging (commenting out various DI inputs) or similar efforts.
The text was updated successfully, but these errors were encountered: