The dmd installer should normally deal with it, maybe it doesn't support VS2017 yet or you didn't install VC++. Try to uninstall dmd, delete its configuration files and install again.