There is nothing to fix.
The constructor is invoked by the container to initialize the object when being resolved.
IX x = container.Resolve<IX>();
Thus Visual Studio wont see any explicit calls to that constructor from the code.
Ideally, the target class should only have one constructor following explicit dependencies principle.
public class X : IX {
private readonly IDependency dependency;
public X(IDependency dependency) {
this.dependency = dependency;
//...
}
//...
}
This will ensure that the lone constructor is the one used by the container when resolving the class.
If one is actively testing their code or is following TDD, then there should be references to the used code in supporting tests.
[TestMethod]
public void X_Should_Do_Something() {
// Arrange
//...
IX subject = new X(...);
// Act
var result = subject.SomeMember();
// Assert
//...
}
where explicit calls are used to arrange the subject under test.