[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 Reply Children
  • 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.

  • SDKVSDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\\

    That first entry is a possible culprit.  When I open my SDK window, my first relevant entry is this...

    SDK=G:\PROGRA~1\Bentley\MICROS~2\SDK\

    The path is modified to DOS-style short paths, with a max 8 chars per component.  You may be able to modify Windows' behaviour using the fsutil behavior command.

    Here's some more info about Windows, Viz Studio and the MicroStation SDK.

     
    Regards, Jon Summers
    LA Solutions