Can dependency injection prevent a circular dependency?
问题 Project#1 has some interfaces and classes that project#2 references. Now I want to use the implementation of Project#2 in Project#1 but vs.net complains about a circular dependency. If I was to use dependancy injection in Project#1 and bind to the implementation in Project#2 (since it adheres to the interface contract), will this work or I will still get the circular dependency error message at runtime? 回答1: You probably could solve this with DI, but you shouldn't . If I understand correctly,