[CE UPDATE 12 C++] DEVEV command unknown

Just installed VS2017 Pro and CE Update 12 SDK , BuildAllExamples worked fine (couple of missing includes in 2 examples) but otherwise OK, however key in DEVENV and says its an unknown command? Any ideas...

  • Hi Stephen,

    please provide more information how your shell is configured.

    DEVENV command (macro) is defined in SDKCommonEnv.bat, so you probably should check whether this file is processed correctly when the shell is started.

    Do other commands defined in this file work or not?

    With regards,

      Jan

  • Any ideas...

    DEVENV, used in the SDK shell, starts Viz Studio 2017 if everything is set up correctly.  Here's what I see when I start the SDK shell...

    **********************************************************************
    ** Visual Studio 2017 Developer Command Prompt v15.9.6
    ** Copyright (c) 2017 Microsoft Corporation
    **********************************************************************
    
    [Windows]
    
      Microsoft Windows 10.0.17134.648 (64-bit), Command Shell (64-bit), Standard
    
    [Command Line]
    
      "C:\Windows\System32\cmd.exe" /x /k ""G:\Program Files\Bentley\MicroStation CONNECT Edition\SDK\MicroStationDeveloperShell.bat" "G
    :\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\" "G:\Program Files\Bentley\MicroStation CONNECT Edition\SDK\""
    
      Arg: G:\PROGRA~1\Bentley\MICROS~2\MICROS~1\  [G:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\]
      Arg: G:\PROGRA~1\Bentley\MICROS~2\SDK\  [G:\Program Files\Bentley\MicroStation CONNECT Edition\SDK\]
    
    [SDK Environment]
    
    MS=G:\PROGRA~1\Bentley\MICROS~2\MICROS~1\
    MSCEMdlappsPath=G:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdlapps\
    MSCEPath=G:\PROGRA~1\Bentley\MICROS~2\MICROS~1\
    MSCESDKShortPath=G:\PROGRA~1\Bentley\MICROS~2\SDK\
    MSMDE=G:\PROGRA~1\Bentley\MICROS~2\SDK\
    MSMDE_Long=G:\Program Files\Bentley\MicroStation CONNECT Edition\SDK\
    MSMDE_OUTPUT=D:\temp\Bentley\MicroStationSDK\
    
    
    Path=G:\PROGRA~2\VI44E1~1\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86;G:\PROGRA~2\VI44E1~1\Common7\IDE\VC\VCPackages;G:\PROGRA~2\VI44E
    1~1\Common7\IDE\CommonExtensions\Microsoft\TestWindow;G:\PROGRA~2\VI44E1~1\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Tea
    m Explorer;G:\PROGRA~2\VI44E1~1\MSBuild\15.0\bin\Roslyn;G:\PROGRA~2\VI44E1~1\Team Tools\Performance Tools;G:\Program Files (x86)\Mic
    rosoft Visual Studio\Shared\Common\VSPerfCollectionTools\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools
    \;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86;C:\Program Files (x86)\Windo
    ws Kits\10\bin\x86;G:\PROGRA~2\VI44E1~1\\MSBuild\15.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;G:\PROGRA~2\VI44E1~1\Common7
    \IDE\;G:\PROGRA~2\VI44E1~1\Common7\Tools\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program F
    iles\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Progr
    am Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program
     Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;
    C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microso
    ft SQL Server\120\Tools\Binn\;C:\WINDOWS\System32\OpenSSH\;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Micros
    oft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;G:\PROGRA~1\Bentley\MICROS~2\SDK\bin;C:\Users\CONNECT\AppData\Lo
    cal\Microsoft\WindowsApps;;G:\PROGRA~2\VI44E1~1\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;G:\PROGRA~2\VI44E1~1\Common7\
    IDE\CommonExtensions\Microsoft\CMake\Ninja;G:\PROGRA~1\Bentley\MICROS~2\SDK\bin\;G:\PROGRA~1\Bentley\MICROS~2\SDK\MigrationTools\;G:
    \PROGRA~1\Bentley\MICROS~2\MICROS~1\
    
    [SDKTIPS]
    
       [TIP] "Type 'SDKFORUM' to go to the MicroStation Programming Community"
       [TIP] "Type e.g.'SDKSEARCH SystemCallback' to locate API specific implementation or migration details"
       [TIP] "Type e.g.'SDKSEARCH CreateLineElement VERBOSE' search across all files: SDK, ParentProduct, ParentProductWorkspace"
       [TIP] "Type 'BUILDALLEXAMPLES' to validate you build environment"
       [TIP] "Type 'BUILD [VERBOSE]' to build code with log file [optional 'VERBOSE' output]"
       [TIP] "Type  e.g.'BMAKE +avilC MyApp > BuildOutput.txt' to obtain verbose sequential build details"
       [TIP] "Type 'BDNVIDEOS' to view SDK Introductory videos"
       [TIP] "Type 'SDKMACROS' to view navigation and utility shortcut macro (aliases)"
       [TIP] "Type 'SDKTIPS' to see this list of tips again"
    
    G:\PROGRA~1\Bentley\MICROS~2\SDK\examples>devenv
    
    G:\PROGRA~1\Bentley\MICROS~2\SDK\examples>

     
    Regards, Jon Summers
    LA Solutions

  • Thank you Jan and Jon,

    Starting to trace the problem now...
    something definitely not loading correctly with the Developer Command Prompt VsDevCmd.bat file as it shows as missing. and I don;t get the 
    **********************************************************************
    ** Visual Studio 2017 Developer Command Prompt v15.9.6
    ** Copyright (c) 2017 Microsoft Corporation
    **********************************************************************

    Think I have some Environment variables missing from the VS2017 missing.
    Will uninstall, clear settings and re-install.

  • One other question Jon/Jan, what version of .Net have you got showing on the title bar of the SDK command dialog mine is showing

    "REQUIRES: Visual Studio 2017, .NET Framework 4.6.1"

    I only ask as I thought the requirement was for .NET 4.6.2 with Update 12 

  • Hi Stephen,

    something definitely not loading correctly with the Developer Command Prompt VsDevCmd.bat file

    why you mentioned VsDevCmd.bat file. It's a part of Visual Studio installation and not MicroStation SDK installation.

    How do you start MicroStatin SDK shell?

    Mine shortcut is

    C:\Windows\System32\cmd.exe /x /k ""C:\Program Files\Bentley\MicroStationCONNECTSDK\MicroStationDeveloperShell.bat" "C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\" "C:\Program Files\Bentley\MicroStationCONNECTSDK\""

    One other question Jon/Jan, what version of .Net have you got showing on the title bar of the SDK command dialog mine is showing

    The value of SDKNETVER variable comes from analysis done by .mki fles. It's true SDKNETVER should be set to 4.6.2 to follow MicroStation specs, but I guess it's not critical issue. ?

    With regards,

      Jan

  • Finally figured out what is happening, my Visual Studio 2017 has installed into a folder 

    C:\Program Files (x86)\Microsoft Visual Studio

    With spaces in the folder path

    The call to the VsDevCmd.bat in visual studio tools fails in the SDKCommonEnv.bat file at line

    call %SDKVSENV%

    Amending it to

     call "%SDKVSENV%" fixes the problem.

    Many thanks to Jan and Jon for pointing me in the right direction.

  • Hi Stephen,

    Amending it to  call "%SDKVSENV%" fixes the problem.

    despite of it's good you found the solution, you should be aware it's not the fix, but only a workaround.

    Finally figured out what is happening, my Visual Studio 2017 has installed into a folder C:\Program Files (x86)\Microsoft Visual Studio With spaces in the folder path

    This is standard VS installation folder and the spaces should not cause any problem. On my computer it works fine. So I guess there is something else that changes how Windows shell works with spaces.

    Regards,

      Jan

  • what version of .Net have you got showing on the title bar of the SDK command dialog

    Normal: SDK shell normal

    Admin: SDK shell admin

     
    Regards, Jon Summers
    LA Solutions

  • something definitely not loading correctly with the Developer Command Prompt VsDevCmd.bat file as it shows as missing.

    Hi ,

    MicroStation CONNECT Edition Update 12 (and SDK) underwent some larger scale changes in the move to Microsoft Visual Studio 2017 due to (good) side-by-side and platform dependent toolset location changes.  Microsoft's best practices are now to use VsDevCmd.bat vs. vcvars???.bat VS shell initialization.  The recommended VsDevCmd.bat is now the default VS dev environment called for setup, but I also wanted to create some overrides for any (custom) tool path and file name required; just in case things change or we cannot anticipate, we can still adapt quickly.  If you may have not seen the most recent SDK Announcement for Update 12 I have updated the Requirements section providing all the details that I have verified are needed/required at this time for Visual Studio and to provide convenience links to some of the most common VS related tasks and background mentioned above (if helpful).  So, if you can please check your current VS configuration against the Requirements and let me know if they help resolve the issue(s) or if you need more assistance afterwards and I will try to help resolve the issue(s) as quick as possible.

    HTH,
    Bob



  • "REQUIRES: Visual Studio 2017, .NET Framework 4.6.1"

    I only ask as I thought the requirement was for .NET 4.6.2 with Update 12 

    Hi ,

    As mentioned above there were significant changes in re-tooling for VS2017 over prior versions and this is one item I will ensure gets cleared up. As Jan mentions the requirements placed in the developer shell title are dynamic at each startup and "ask the sdk" what the requirements are directly from the mki files (for now).  This does point to an inconsistency that I noticed and will be filing a defect for to hopefully see improved for the MSCE SDK U13 release, and hopefully some additional "lesser" public requirements vs. internal heavier ones.  I will update this response once I have a defect filed.

    HTH,
    Bob