build MicroStation CE SDK examples with Visual Studio 2017 Community

I recently download MicroStation CE SDK, and running into a series of issues when trying to build SDK examples. Thought it's a good idea to share the solutions I found...

My environment: Win 10 + Visual Studio 2017 Community + MicroStation CE (v10.11.00.36) + MicroStation CE SDK (v10.11.00.42)

Issue 1: when building SDK examples, got error 'VS2015_DotNetToolsDir was not defined'

Solution: install '.NET Framework 4.6.1 Developer Pack and Language Packs' AND update 'C:\Program Files\Bentley\MicroStationCONNECTSDK\mki\VCVarsQueryRegistry14.mki as follows

change line 97 & 104

from: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/NETFXSDK/4.6
to: HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Microsoft/Microsoft SDKs/NETFXSDK/4.6.1

Issue 2: when building SDK examples, got error 'VS2015_FrameworkVersion64 was not defined'

solution: change visual studio 2017 installation by clicking on 'Desktop development with C++' first then ticking ON 'vc++ 2015.3 v14.0 toolset for desktop' (see the pic below) AND update 'C:\Program Files\Bentley\MicroStationCONNECTSDK\mki\VCVarsQueryRegistry14.mki as follows

change line 133 & 140

from: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/SxS/VC7
to: HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Microsoft/VisualStudio/SxS/VC7

Issue 3: mt.exe is not a regonized cmd

solution: install Win 10 SDK AND add 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\' (where mt.exe resides) in the env var path

HTH