[CONNECT U14 C#] MicrostationDeveloperShell.bat returns \Microsoft unexepected at this time.

Hello All. First post, please be kind!

I'm just getting started with writing plugins for MicroStation, though I typically work on writing plugins for Rhino 3D. My goal is to write plugins in C# with Visual Studio 2019. I've downloaded and installed Microstation CONNECT 14 and the corresponding SDK. When I run the MicrostationDeveloperShell.bat from the SDK shortcut I get  \Microsoft unexepected at this time:

So I thought, ok, I'll just dig into the samples, open one up, and build it myself. Well, that didn't work either. I opened up MicroStationCONNECTSDK\examples\Elements\ManagedToolsExample, corrected the references to point to the right dlls, cleaned, rebuilt. The references still don't seem to be found.

Any advice for a beginner like myself?

Thanks in advanced and apologies for any obvious things I am overlooking on my part!

Parents
  • My goal is to write plugins in C# with Visual Studio 2019 for CONNECT U14

    So far, so good!

    When I run the MicrostationDeveloperShell.bat from the SDK shortcut

    I test each release of the SDK, including that for Update 14.  It all works out of the box.

    When I run the MicrostationDeveloperShell.bat from the SDK shortcut I get  \Microsoft unexepected at this time:

    That looks like there's a path with spaces somewhere, that should be a quoted "path with spaces".

    In the SDK shell, type SET SDK to see the environment and post the resulting FraguadaEnv.txt here...

    SET SDK > %TMP%FraguadaEnv.txt

     
    Regards, Jon Summers
    LA Solutions

  • SDKVSDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\\ - I only have 2017 Build Tools installed, otherwise, I use 2019
    SDKVSVER=2017 - same as above
    SHELLARGS="C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\" "E:\dev\MicroStationCONNECTSDK\"
    SHELLCMDLINE="C:\Windows\System32\cmd.exe" /x /k ""E:\dev\MicroStationCONNECTSDK\MicroStationDeveloperShell.bat" "C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\" "E:\dev\MicroStationCONNECTSDK\""
    _SDKSEARCHDEFSREGEX="^#define.*.* ^struct.*.* ^typedef.*.* ^enum.*.* ^class.*.* ^MdlFunctionP.*.* .*_EXPORT.*.* .*_TYPEDEFS.*.*"
    _SDKSEARCHMSG="Would you like to continue with a web search on: Bentley Communities MicroStation Programming Forum?"
    _SDKSEARCHURLPOST="#serpsort=date%20desc
    _SDKSEARCHURLPRE="https://communities.bentley.com/search?q="

    Hello Jon,
    Thanks for the reply. I found the announcement for the U14 SDK release which revealed I might not have all of the requirements. I installed the missing tools for Visual Studio 2019 but it had no effect on being able to build the sample.
    Looking at SET revealed a lot of stuff I'd rather not post, but here are the ONLY entries with quotes, or ones that stood out as interesting.

Reply
  • SDKVSDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\\ - I only have 2017 Build Tools installed, otherwise, I use 2019
    SDKVSVER=2017 - same as above
    SHELLARGS="C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\" "E:\dev\MicroStationCONNECTSDK\"
    SHELLCMDLINE="C:\Windows\System32\cmd.exe" /x /k ""E:\dev\MicroStationCONNECTSDK\MicroStationDeveloperShell.bat" "C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\" "E:\dev\MicroStationCONNECTSDK\""
    _SDKSEARCHDEFSREGEX="^#define.*.* ^struct.*.* ^typedef.*.* ^enum.*.* ^class.*.* ^MdlFunctionP.*.* .*_EXPORT.*.* .*_TYPEDEFS.*.*"
    _SDKSEARCHMSG="Would you like to continue with a web search on: Bentley Communities MicroStation Programming Forum?"
    _SDKSEARCHURLPOST="#serpsort=date%20desc
    _SDKSEARCHURLPRE="https://communities.bentley.com/search?q="

    Hello Jon,
    Thanks for the reply. I found the announcement for the U14 SDK release which revealed I might not have all of the requirements. I installed the missing tools for Visual Studio 2019 but it had no effect on being able to build the sample.
    Looking at SET revealed a lot of stuff I'd rather not post, but here are the ONLY entries with quotes, or ones that stood out as interesting.

Children