Refactor winmd resolving.