[CONNECT .NET] CONNECT Update 11 SDK: Build ManagedItemTypesExample fails in Visual Studio

I can open the MicroStation CONNECT Update 11 SDK command window and invoke BuildAllExamples.bat successfully.

If I change to folder \Annotatation\ManagedItemTypesExample and execute openSln.bat in the same SDK command window then Viz Studio opens and loads that project.

However, when I build that project in Viz Studio the build fails.  Viz Studio complains that it can't create temporary files in

...\SDK\examples\Annotations\ManagedItemTypesExample\obj\Debug

If I create those folders (obj, Debug) manually then Viz Studio builds successfully.

Parents Reply Children
  • Hi All,

    The MicroStation Developer Shell at this time is documented to be run using local Administrator privileges (GOOD: Elevated User == White Text + Black Background, Standard User: BAD == Yellow Text + Black Background. In short, a Yellow shell is bad.  The Developer shell also provides a dynamic title bar (each start) that reflects if running as a Standard or Elevated user.  The primary reason is that MDL applications (.ma) are often required to be built in a Program Files output location (mdlapps) folder.

    BuildAllExamples simply will execute bmake +a on all .mke child projects.  The make file inherits the developer shell environment and calls - Visual Studio tools that also inherit the environment and admin privileges of the parent shell.  The pattern I use/recommend is:

    • Create your own copy of the MicroStation Developer Shell shortcut icon (on desktop is fine)
    • Check the Run as Administrator checkbox in your Shortcut Properties. Note, this is helpful since your shortcut can persist and not be affected/replaced by subsequent/numerous version updates.
    • Simply open the correctly associated Microsoft Visual Studio version in the developer shell (type: devenv) that certainly inherits the Developer Shell environment variables (PEB) and Administrator elevation.
    • From Microsoft Visual Studio then navigate to and open your appropriate sln, vcxproj, or vcproj.

    Per everyone's input on this thread (thank you), I will add an action item to review all delivered examples Microsoft solutions and files.  I do know we need to update the default minimum Microsoft .NET Runtime version, and ensure the solutions use a standardized build output (temp) location too.

    HTH,
    Bob