Captive Dependency - ValidateOnBuild not working #53109
Unanswered
rahman3593
asked this question in
General
Replies: 1 comment
-
By build it means when the service container is built when |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was injecting scoped service in singleton service as shown in the above code in image. and I want the solution build to be failed because I have set the ValidateOnBuild property to true. But the build happens successfully.
Note: But when I try to run the application after build it is throwing error as below.

The same happens when tried to inject transient service into singleton as well.
Beta Was this translation helpful? Give feedback.
All reactions