Dagger for JavaDagger for Java/Android does that. It sacrifices some runtime magic (like Guice's) to offer an almost completely compile-time codegen experience, including converting most runtime errors to compilation errors.
Would be cool in .NET too.