GenerateProjectFiles.bat fails due to needing Windows SDK v8.1

When trying to run GenerateProjectFiles.bat a message pops up saying Windows SDK v8.1 is needed.

Go to Windows SDK and emulator archive | Microsoft Developer and download Windows SDK v8.1. Restart your computer and re-run GenerateProjectFiles.bat.