microsoft-logging icon indicating copy to clipboard operation
microsoft-logging copied to clipboard

Automatic constructor registration issue

Open pnmcosta opened this issue 6 years ago • 0 comments

Hi,

This is not working if you rely on automatic constructor registration, https://unitycontainer.github.io/tutorials/registration/Type/Constructor/automatic.html

I've forked this repo, and updated all the dependencies to Unity 5.11.1 and Logging Abstractions 3.0.0

If you add an empty constructor to the LoggedType in the unit test, and run them, it will fail. Unity is probably not picking up ILogger and ILogger<> as resolvable types.

Is this expected behaviour? Or could something be done about it? Because if you use dependencies that do resolve, it will pick the correct constructor (the one with the most arguments)

Thanks, P.

pnmcosta avatar Sep 27 '19 10:09 pnmcosta