Software: Visual Studio 2015 Enterprise
Feature: Windows Phone 8/8.1 Tools
Symptom: While installing Visual Studio 2015 with Windows Phone 8/8.1 tools option checked, the setup program will be stuck at "Visual Studio preparation" or "Installing Windows Phone 8/8.1 SDK" screen for hours with no sign of completion. Cancelling the setup at that point will goes back to another infinite wait.
Findings: Using Process Monitor, it seemed that the setup program was searching for a trn file in specific folders:
Although it's not throwing any error, the setup program was just running in infinite cycles. Probably someone forgot to set the max retry there. To fix that, I created an empty file called "a.trn" in the 2 folders above, and voila, the setup program suddenly can write logs to the folder, and complete the setup.