.NET Framework Bookmark and Share   
 index > 64-Bit .NET Framework Development > "not a Microsoft.NET module" error trying to add a valid x64 assembly to VS 2008 ToolBox
 

"not a Microsoft.NET module" error trying to add a valid x64 assembly to VS 2008 ToolBox

Hi,

I am in the process of upgrading to a 64-bit version of a vision procession library (Cognex VisionPro). I have a [seemingly] valid set of assemblies that checkout just fine with dumpbin.exe and corflags, but whenever I try to add it to Visual Studio 2008 toolbox using the "Browse..." button in "Choose Toolbox Items" window, I get

"Cognex.VisionPro.Display.Control.dll is not a Microsoft .NET module"

where Cognex.VisionPro.Display.Control.dll is the assembly I am trying to add. The assembly seems to be just fine - I ran both dumpbin and corflags, and all looks good. I know it's a 64-bit assembly, but that fact by itself should not be an issue, right? It is also labelled as ILONLY, which means that it probably doesn't matter than much because it's all IL code anyway.... what am I doing wrong?

I tried a few things like explicitly configuring platform to 'x64' for my project.
I created a blank C++/CLI project, but that seems to have to have effect on my ability to add items to the toolbox. The assembly in question should contain a control that displays image analysis results.

Below is the output of dumpbin and corflags.

Thanks!

-Alex

C:\Program Files\Cognex\VisionPro\ReferencedAssemblies>"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\dumpbin.exe" Cognex.VisionPro.Display.Co
ntrols.dll /CLRHEADER /HEADERS
Microsoft (R) COFF/PE Dumper Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file Cognex.VisionPro.Display.Controls.dll

PE signature found

File Type: DLL

FILE HEADER VALUES
            8664 machine (x64)
               2 number of sections
        4A2DDC37 time date stamp Mon Jun 08 20:51:19 2009
               0 file pointer to symbol table
               0 number of symbols
              F0 size of optional header
            212E characteristics
                   Executable
                   Line numbers stripped
                   Symbols stripped
                   Application can handle large (>2GB) addresses
                   32 bit word machine
                   DLL

OPTIONAL HEADER VALUES
             20B magic # (PE32+)
            8.00 linker version
            A000 size of code
            1000 size of initialized data
               0 size of uninitialized data
               0 entry point
            2000 base of code
        11000000 image base (0000000011000000 to 000000001100DFFF)
            2000 section alignment
            1000 file alignment
            4.00 operating system version
            0.00 image version
            4.00 subsystem version
               0 Win32 version
            E000 size of image
            1000 size of headers
           188D7 checksum
               3 subsystem (Windows CUI)
             400 DLL characteristics
                   No structured exception handler
          400000 size of stack reserve
            4000 size of stack commit
          100000 size of heap reserve
            2000 size of heap commit
               0 loader flags
              10 number of directories
               0 [       0] RVA [size] of Export Directory
               0 [       0] RVA [size] of Import Directory
            C000 [     358] RVA [size] of Resource Directory
               0 [       0] RVA [size] of Exception Directory
               0 [       0] RVA [size] of Certificates Directory
               0 [       0] RVA [size] of Base Relocation Directory
            B9E8 [      1C] RVA [size] of Debug Directory
               0 [       0] RVA [size] of Architecture Directory
               0 [       0] RVA [size] of Global Pointer Directory
               0 [       0] RVA [size] of Thread Storage Directory
               0 [       0] RVA [size] of Load Configuration Directory
               0 [       0] RVA [size] of Bound Import Directory
               0 [       0] RVA [size] of Import Address Table Directory
               0 [       0] RVA [size] of Delay Import Directory
            2000 [      48] RVA [size] of COM Descriptor Directory
               0 [       0] RVA [size] of Reserved Directory


SECTION HEADER #1
   .text name
    9A8A virtual size
    2000 virtual address (0000000011002000 to 000000001100BA89)
    A000 size of raw data
    1000 file pointer to raw data (00001000 to 0000AFFF)
       0 file pointer to relocation table
       0 file pointer to line numbers
       0 number of relocations
       0 number of line numbers
60000020 flags
         Code
         Execute Read

  Debug Directories

        Time Type       Size      RVA  Pointer
    -------- ------ -------- -------- --------
    4A2DDC37 cv           86 0000BA04     AA04    Format: RSDS, {6C827344-DCA4-4F4B-9EDF-A8A9D64A9245}, 1, B:\vx\src\NETControls\Cognex.VisionPro.Display.Contro
ls\obj\x64\Release\Cognex.VisionPro.Display.Controls.pdb

  clr Header:

              48 cb
            2.05 runtime version
            58E4 [    6104] RVA [size] of MetaData Directory
               9 flags
                   IL Only
                   Strong Name Signed
               0 entry point token
            5168 [     77A] RVA [size] of Resources Directory
            2050 [      80] RVA [size] of StrongNameSignature Directory
               0 [       0] RVA [size] of CodeManagerTable Directory
               0 [       0] RVA [size] of VTableFixups Directory
               0 [       0] RVA [size] of ExportAddressTableJumps Directory
               0 [       0] RVA [size] of ManagedNativeHeader Directory


SECTION HEADER #2
   .rsrc name
     358 virtual size
    C000 virtual address (000000001100C000 to 000000001100C357)
    1000 size of raw data
    B000 file pointer to raw data (0000B000 to 0000BFFF)
       0 file pointer to relocation table
       0 file pointer to line numbers
       0 number of relocations
       0 number of line numbers
40000040 flags
         Initialized Data
         Read Only

  Summary

        2000 .rsrc
        A000 .text

C:\Program Files\Cognex\VisionPro\ReferencedAssemblies>
C:\Program Files\Cognex\VisionPro\ReferencedAssemblies>corflags Cognex.VisionPro.Display.Controls.dll
Microsoft (R) .NET Framework CorFlags Conversion Tool.  Version  3.5.21022.8
Copyright (c) Microsoft Corporation.  All rights reserved.

Version   : v2.0.50727
CLR Header: 2.5
PE        : PE32+
CorFlags  : 9
ILONLY    : 1
32BIT     : 0
Signed    : 1

C:\Program Files\Cognex\VisionPro\ReferencedAssemblies>
  • Edited byavue Monday, July 06, 2009 6:29 AM
  •  
avue
You could try running Ildasm.exe for an additional diagnostic. Considering the source of the assembly, it is not unlikely an obfuscator was used to protect IP. You'll probably need help from Cognex to get past this hump.

Hans Passant.
nobugz
You could try running Ildasm.exe for an additional diagnostic. Considering the source of the assembly, it is not unlikely an obfuscator was used to protect IP. You'll probably need help from Cognex to get past this hump.

Hans Passant.
nobugz

You can use google to search for other answers

Custom Search

More Threads

• 64Bit Compiler?
• BIFE Hell
• a question about dialog message in 64 bit machine
• Compiling ASP.NET projects on x64
• side-by-side error how to properly configure manifest 64 bit
• doubles become integers on Vista 64-bit
• Mixed Debugging
• Conexant audio problem on Windows XP Pro X64
• Force 64 bit ints?
• Installer error whit aspnet_regiis.exe