You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using unity for DI in a large C# web application with lots of dependencies. Very rarely we see the Resolve process fail for one of our objects, only to immediately succeed on the next call with no changes in configuration or web call. The objects that fail seem random and the timing seems random. It fails with the error "Resolution failed with error: No public constructor is available for type", but the class does have a publicly accessible constructor. I am guessing this may be some sort of race condition in the unity startup code that may be causing this. Here is an example stack trace:
We are using unity for DI in a large C# web application with lots of dependencies. Very rarely we see the Resolve process fail for one of our objects, only to immediately succeed on the next call with no changes in configuration or web call. The objects that fail seem random and the timing seems random. It fails with the error "Resolution failed with error: No public constructor is available for type", but the class does have a publicly accessible constructor. I am guessing this may be some sort of race condition in the unity startup code that may be causing this. Here is an example stack trace:
https://gist.github.com/rstallings/47917494c4af23af6f18412b5d3d084d
Is there any guidance you can provide on what may be happening here? Or ways to track this issue down/produce more useful information for you guys?
Any help is appreciated.
The text was updated successfully, but these errors were encountered: