MicroStation SDK Dimensions Example

I am trying to load an example from the MicroStation SDK examples; DimensionsExample.  When I try to load the addin, I get the following error:

System.BadImageFormatException: Could not load file or assembly 'dimensionsexample' or one of its dependencies. The module was expected to contain an assembly manifest.

Does anyone know what is causing this error?

When I compile the code, I do get this message:

mt.exe -manifest C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExample.dll.Manifest -outputresource:"C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdlapps\DimensionsExample.dll";2'mt.exe' is not recognized as an internal or external command,operable program or batch file.

I am running MicroStation Connect Edition Update 11 - Version 10.11.00.36, Windows 10 and MicroStation SDK version 10.11.0042.

Thanks,

Larry

  • When I compile the code

    Do you build the example from the SDK shell?

    Whenever there's a new release of the SDK, I build all the examples to check that everything is OK. I don't recall any problem with Update 11. You can use BuildAllExamples.bat in the SDK\examples folder.

     
    Regards, Jon Summers
    LA Solutions

  • Jon, yes I did build the example from the SDK shell.  This is the output from the build:

    [== Building C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExamplecmd.h, (C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\DimensionsExamplecmd.r) ==]
    rcomp @C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\make.opt
    MicroStation Resource Compiler 03.16.02
       Generating header file (C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExamplecmd.h) ... done.
    [== Building C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\rscobj\DimensionsExamplecmd.rsc, (C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\DimensionsExamplecmd.r) ==]
    rcomp @C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\make.opt
    MicroStation Resource Compiler 03.16.02
    [== Building C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExample.obj, (C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\DimensionsExample.cpp) ==]
    cl -IC:\PROGRA~1\Bentley\MICROS~2\include\ -IC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\    -GS- -EHc -GR -wd4345 -GF -favor:blend -D_X64_ -wd4701 -wd4244 -wd4564 -wd4702 -c -W4 -DBENTLEY_WARNINGS_HIGHEST_LEVEL -DWIN32 -DwinNT -MD -D__EXCEPTIONS -D_VISCXX -Gy -wd4996 -Ox -Oy- -Os -D_CONVERSION_DONT_USE_THREAD_LOCALE -D_SECURE_SCL=0 -DWIN32_LEAN_AND_MEAN  -DNTDDI_WIN7SP1=0x06010100 -we4692   -nologo -WX -MP -Zi -Zo -FdC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\objects.pdb    -EHs   -fp:fast -FoC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExample.obj C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\DimensionsExample.cpp
    DimensionsExample.cpp
    [== Building C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\ElementsCreateTool.obj, (C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\ElementsCreateTool.cpp) ==]
    cl -IC:\PROGRA~1\Bentley\MICROS~2\include\ -IC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\    -GS- -EHc -GR -wd4345 -GF -favor:blend -D_X64_ -wd4701 -wd4244 -wd4564 -wd4702 -c -W4 -DBENTLEY_WARNINGS_HIGHEST_LEVEL -DWIN32 -DwinNT -MD -D__EXCEPTIONS -D_VISCXX -Gy -wd4996 -Ox -Oy- -Os -D_CONVERSION_DONT_USE_THREAD_LOCALE -D_SECURE_SCL=0 -DWIN32_LEAN_AND_MEAN  -DNTDDI_WIN7SP1=0x06010100 -we4692   -nologo -WX -MP -Zi -Zo -FdC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\objects.pdb    -EHs   -fp:fast -FoC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\ElementsCreateTool.obj C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\ElementsCreateTool.cpp
    ElementsCreateTool.cpp
    [== Building C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExampleCreateTool.obj, (C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\DimensionsExampleCreateTool.cpp) ==]
    cl -IC:\PROGRA~1\Bentley\MICROS~2\include\ -IC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\    -GS- -EHc -GR -wd4345 -GF -favor:blend -D_X64_ -wd4701 -wd4244 -wd4564 -wd4702 -c -W4 -DBENTLEY_WARNINGS_HIGHEST_LEVEL -DWIN32 -DwinNT -MD -D__EXCEPTIONS -D_VISCXX -Gy -wd4996 -Ox -Oy- -Os -D_CONVERSION_DONT_USE_THREAD_LOCALE -D_SECURE_SCL=0 -DWIN32_LEAN_AND_MEAN  -DNTDDI_WIN7SP1=0x06010100 -we4692   -nologo -WX -MP -Zi -Zo -FdC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\objects.pdb    -EHs   -fp:fast -FoC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExampleCreateTool.obj C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\DimensionsExampleCreateTool.cpp
    DimensionsExampleCreateTool.cpp
    [== Building C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExampleDeleteTool.obj, (C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\DimensionsExampleDeleteTool.cpp) ==]
    cl -IC:\PROGRA~1\Bentley\MICROS~2\include\ -IC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\    -GS- -EHc -GR -wd4345 -GF -favor:blend -D_X64_ -wd4701 -wd4244 -wd4564 -wd4702 -c -W4 -DBENTLEY_WARNINGS_HIGHEST_LEVEL -DWIN32 -DwinNT -MD -D__EXCEPTIONS -D_VISCXX -Gy -wd4996 -Ox -Oy- -Os -D_CONVERSION_DONT_USE_THREAD_LOCALE -D_SECURE_SCL=0 -DWIN32_LEAN_AND_MEAN  -DNTDDI_WIN7SP1=0x06010100 -we4692   -nologo -WX -MP -Zi -Zo -FdC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\objects.pdb    -EHs   -fp:fast -FoC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExampleDeleteTool.obj C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\DimensionsExampleDeleteTool.cpp
    DimensionsExampleDeleteTool.cpp
    [== Building C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExampleModifyTool.obj, (C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\DimensionsExampleModifyTool.cpp) ==]
    cl -IC:\PROGRA~1\Bentley\MICROS~2\include\ -IC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\    -GS- -EHc -GR -wd4345 -GF -favor:blend -D_X64_ -wd4701 -wd4244 -wd4564 -wd4702 -c -W4 -DBENTLEY_WARNINGS_HIGHEST_LEVEL -DWIN32 -DwinNT -MD -D__EXCEPTIONS -D_VISCXX -Gy -wd4996 -Ox -Oy- -Os -D_CONVERSION_DONT_USE_THREAD_LOCALE -D_SECURE_SCL=0 -DWIN32_LEAN_AND_MEAN  -DNTDDI_WIN7SP1=0x06010100 -we4692   -nologo -WX -MP -Zi -Zo -FdC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\objects.pdb    -EHs   -fp:fast -FoC:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExampleModifyTool.obj C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\DimensionsExampleModifyTool.cpp
    DimensionsExampleModifyTool.cpp
    [== Building C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExample.mi, (C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExamplecmd.rsc) ==]
    rlib @C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\make.opt
    MicroStation Resource Librarian 03.16.02
    [== Building "C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdlapps\DimensionsExample.dll", (C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExample.obj) ==]
    link -out:"C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdlapps\DimensionsExample.dll"  -WX   -Ignore:4087 -Ignore:4089 -Ignore:4199  -MANIFESTUAC:NO -Release   -debug -incremental:no -fixed:no @C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExamplelink.rsp
    Microsoft (R) Incremental Linker Version 14.00.24215.1
    Copyright (C) Microsoft Corporation.  All rights reserved.
    -dynamicbase
    -dll
    "-out:C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdlapps\DimensionsExample.dll"
    "-implib:C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExample.lib"
    "-pdb:C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdlapps\DimensionsExample.pdb"
    -debug -incremental:no -fixed:no
    -MANIFEST
    -MANIFESTFILE:C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExample.dll.Manifest
    C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExample.obj C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\ElementsCreateTool.obj C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExampleCreateTool.obj C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExampleDeleteTool.obj C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExampleModifyTool.obj C:\PROGRA~1\Bentley\MICROS~2\library\bentley.lib C:\PROGRA~1\Bentley\MICROS~2\library\BentleyAllocator.lib C:\PROGRA~1\Bentley\MICROS~2\library\mdlbltin.lib C:\PROGRA~1\Bentley\MICROS~2\library\RmgrTools.lib C:\PROGRA~1\Bentley\MICROS~2\library\BentleyGeom.lib C:\PROGRA~1\Bentley\MICROS~2\library\DgnPlatform.lib C:\PROGRA~1\Bentley\MICROS~2\library\dgnview.lib gdi32.lib user32.lib kernel32.lib C:\PROGRA~2\MICROS~1.0\VC\\lib\amd64\msvcrt.lib
    C:\PROGRA~1\Bentley\MICROS~2\library\mdlbltin.lib
       Creating library C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExample.lib and object C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExample.exp
    mt.exe -manifest C:\Users\LARRY~1.SMA\AppData\Local\Temp\Bentley\MicroStationSDK\objects\DimensionsExample.dll.Manifest -outputresource:"C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdlapps\DimensionsExample.dll";2
    'mt.exe' is not recognized as an internal or external command,
    operable program or batch file.
    Thu Jan 10 11:52:26 2019, elapsed time: 0:09
    BMAKE: call trace
        line:  411, C:\PROGRA~1\Bentley\MICROS~2\mki\dlmlink.mki
        line:  115, C:\PROGRA~1\Bentley\MICROS~2\examples\DIMENS~1\DIMENS~1.MKE
    Bentley Systems Make Utility. Version 10.00.00.26, Mar 15 2018
    Thu Jan 10 11:52:27 2019
  • Answer Verified By: Robert Hook