I was getting intermittent errors with Windows 10 not being able to find VCRUNTIM140.dll. This caused issues for Train Simulator.
The fix is to install both x86 and x64 versions of Visual C++ redistribuals, as per:
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
I had only installed the x86 version.