How do I Enable Code Analysis for my project in VS2017?

The solution files generated by Unreal do not seem to support using the Visual Studio code analysis tools as documented here:

When viewing the “Code Analysis Settings” for the generated solution, you get a message saying:

“There are no currently analyzable project loaded.”

I also tried manually generating the project files with:

“C:\Program Files\Epic Games\UE_4.18\Engine\Binaries\DotNET\UnrealBuildTool.exe” -projectfiles -project=myproject.uproject -game -rocket -progress -2017 -StaticAnalyzer=VisualCpp

But this didn’t seem to make any difference.

Anyone know how to make this work?

I’d also like to know this!