Hi,
I've installed the Microstation CE SDK and the buildallexample.bat is not running properly. Here's an example of the output I get when running the bat:
C:\PROGRA~1\Bentley\MICROS~1\examples>buildallexamples
[Fri 25/02/2022 12:31:28.97] [Fri 25/02/2022 12:31:28.97] PROCESSING STARTED[Fri 25/02/2022 12:31:28.98] [START] Building all SDK examples of type: .mke[Fri 25/02/2022 12:31:29.04] [COMMAND] bmake.exe +a C:\PROGRA~1\Bentley\MICROS~1\examples\ANNOTA~1\DESCRI~1\DESCRI~1.MKEBentley Systems Make Utility. Version 10.00.00.26, Mar 15 2018Fri Feb 25 12:31:29 2022
[Fri 25/02/2022 12:31:28.97] [Fri 25/02/2022 12:31:28.97] PROCESSING STARTED
[Fri 25/02/2022 12:31:28.98] [START] Building all SDK examples of type: .mke
[Fri 25/02/2022 12:31:29.04] [COMMAND] bmake.exe +a C:\PROGRA~1\Bentley\MICROS~1\examples\ANNOTA~1\DESCRI~1\DESCRI~1.MKE
Bentley Systems Make Utility. Version 10.00.00.26, Mar 15 2018
Fri Feb 25 12:31:29 2022
~mkdir Build\VSEnvironment\ PublicSDK\VsDevCmdImport.py --vsversion=2019 --targetarch=amd64 --targetframeworkversion=v4.6.2 --hostarch=x86 Build\VSEnvironment\VsDevCmd_16_v4.6.2_amd64.mkiThe system cannot find the path specified.Fri Feb 25 12:31:29 2022, elapsed time: 0:00BMAKE: call trace line: 1104, C:\PROGRA~1\Bentley\MICROS~1\mki\AssertToolSet.mki line: 114, C:\PROGRA~1\Bentley\MICROS~1\mki\ConfigurePolicy.mki line: 26, C:\PROGRA~1\Bentley\MICROS~1\mki\mdl.mki line: 17, C:\PROGRA~1\Bentley\MICROS~1\examples\ANNOTA~1\DESCRI~1\DESCRI~1.MKE[Fri 25/02/2022 12:31:29.20] [COMMAND] bmake.exe +a C:\PROGRA~1\Bentley\MICROS~1\examples\ANNOTA~1\DWGAPP~1\DWGAPP~1.MKEBentley Systems Make Utility. Version 10.00.00.26, Mar 15 2018Fri Feb 25 12:31:29 2022
~mkdir Build\VSEnvironment\
PublicSDK\VsDevCmdImport.py --vsversion=2019 --targetarch=amd64 --targetframeworkversion=v4.6.2 --hostarch=x86 Build\VSEnvironment\VsDevCmd_16_v4.6.2_amd64.mki
The system cannot find the path specified.
Fri Feb 25 12:31:29 2022, elapsed time: 0:00
BMAKE: call trace
line: 1104, C:\PROGRA~1\Bentley\MICROS~1\mki\AssertToolSet.mki
line: 114, C:\PROGRA~1\Bentley\MICROS~1\mki\ConfigurePolicy.mki
line: 26, C:\PROGRA~1\Bentley\MICROS~1\mki\mdl.mki
line: 17, C:\PROGRA~1\Bentley\MICROS~1\examples\ANNOTA~1\DESCRI~1\DESCRI~1.MKE
[Fri 25/02/2022 12:31:29.20] [COMMAND] bmake.exe +a C:\PROGRA~1\Bentley\MICROS~1\examples\ANNOTA~1\DWGAPP~1\DWGAPP~1.MKE
Is it something to to with environment setting and not being able to find the right paths?
Hi Lachlan Hand,
If you set the Run as Administrator property in your Desktop MicroStation CONNECT Developer Shell shortcut, are you able to compile the examples?
If still unable to compile the examples, try to compile (1) example using (your example folder above); e.g. build DescribeElementExample.mke. After it attempts to build the example you should be prompted with: View Log File in Folder? [Y,N]?. Answer yes, then zip and attach the file created (e.g.Build-DescribeElementExample-Verbose-Output.txt) with your reply to this thread for us to review what (still) may be wrong.
Thank you and HTH,Bob
I tried build DescribeElementExample.mke and I still get 'The system cannot find the path specified.'
log attached
Build-DescribeElementExample-Verbose-Output.txt
Your VSDIR variable is returned as incomplete.Can you provide the output of this command?"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version 16.0 -property installationPath | findstr 2019
If the command returns nothing, then can you remove the last part and send output of it, like this:"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version 16.0 -property installationPath
FYI. The current MSCE U16.2 SDK Requirements are for Visual Studio 2019 Professional edition. If the above (2) commands fail and you have a version installed as a last resort try creating a new OS System Level Variable called: VSDIR and set it to a value of the root folder of your VS2019 install e.g. C:\Devtools\VisualStudio2019\Note: Due to requirements I install my VS installs to a non-default location like the path used above and yours will certainly differ so use the root install folder of your location making sure there is a trailing backslash in the variable's value.
output is:
C:\Program Files\Microsoft Visual Studio\2022\Community
VS2019 Professional is the current SDK requirement and I recommend that you install that version Side by Side so the SDK development environment works as intended.Although not supported and you may be subjecting yourself to a number of anomalies if you MicroStationDeveloperShell.bat:13:set BUILD_USING_VS2019=1 to be a value of BUILD_USING_VS2022=1 you may or may not be able to use the current SDK with VS2022. Again, this is not supported and only suggested (to try/test) if you cannot install VS2019 Professional Side by Side with VS2022.HTH,Bob
Lachlan Hand said:C:\Program Files\Microsoft Visual Studio\2022\Community
I don't think that Viz Studio 2022 is supported by the CONNECT Update 16 SDK (or earlier). Stick to a supported version (e.g. Viz Studio 2019).
Regards, Jon Summers LA Solutions
Answer Verified By: Lachlan Hand
yep everything is working normally after installing VS 2019, thanks!