Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Wrong .Net version runtime Assembly Manager launched in VBAScript

Wrong .Net version runtime Assembly Manager launched in VBAScript

Scheduled Pinned Locked Moved Visual Basic
questioncsharpdotnetwpf
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cateyes99
    wrote on last edited by
    #1

    I've .Net v1.1.4322 and .Net v2.0.50727 both installed on my machine. I've a Excel hosted VBA Script test harness. It makes calls to .Net v2.0.50727 assemblies through COM callable wrapper (CCW). But I found during running this Excel test script, the wrong version of .Net runtime enviroment triggerred! It's supposed that the .Net v2.0.50727 runtime would be launched to run, not the .Net v1.1.4322. All the assemblies called by the script are developed in .Net v2.0.50727. The below message was extrated from the Assembly Binding Log Viewer (Fuslogvw.exe). As we can see, the v1.1.4322 fusion.dll was loaded instead of v2.0.50727 fusion.dll. But SG.AG.Qt.Act.Client.Streams.dll and all other assemblies are developed in .Net v2.0.50727. So it crashed. Would anyone know why Windows chose .Net v1.1.4322 rather than v2.0.50727 to run my script? How can I indicate Windows to choose v2.0.50727 correctly? Thanks so much.

    *** Assembly Binder Log Entry (6/29/2007 @ 3:18:58 PM) ***

    The operation failed.
    Bind result: hr = 0x80131107. No description available.

    Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll
    Running under executable C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE
    --- A detailed error log follows.

    === Pre-bind state information ===
    LOG: Where-ref bind. Location = C:/WINDOWS/assembly/GAC_MSIL/SG.AG.Qt.Act.Client.Streams/4.5.0.0__ea69dc1d65f83a25/SG.AG.Qt.Act.Client.Streams.dll
    LOG: Appbase = C:\Program Files\Microsoft Office\OFFICE11\
    LOG: Initial PrivatePath = NULL
    LOG: Dynamic Base = NULL
    LOG: Cache Base = NULL
    LOG: AppName = NULL
    Calling assembly : (Unknown).

    LOG: Processing DEVPATH.
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Attempting download of new URL file:///C:/WINDOWS/assembly/GAC_MSIL/SG.AG.Qt.Act.Client.Streams/4.5.0.0__ea69dc1d65f83a25/SG.AG.Qt.Act.Client.Streams.dll.
    LOG: Assembly download was successful. Attempting setup of file: C:/WINDOWS/assembly/GAC_MSIL/SG.AG.Qt.Act.Client.Streams/4.5.0.0__ea69dc1d65f83a25/SG.AG.Qt.Act.Client.Streams.dll
    LOG: Entering run-from-source setup phase.
    ERR: Error extracting manifest import from file (hr = 0x80131107).
    ERR: Failed to complete setup of assembly (hr = 0x80131107). Probing terminated.

    C 1 Reply Last reply
    0
    • C cateyes99

      I've .Net v1.1.4322 and .Net v2.0.50727 both installed on my machine. I've a Excel hosted VBA Script test harness. It makes calls to .Net v2.0.50727 assemblies through COM callable wrapper (CCW). But I found during running this Excel test script, the wrong version of .Net runtime enviroment triggerred! It's supposed that the .Net v2.0.50727 runtime would be launched to run, not the .Net v1.1.4322. All the assemblies called by the script are developed in .Net v2.0.50727. The below message was extrated from the Assembly Binding Log Viewer (Fuslogvw.exe). As we can see, the v1.1.4322 fusion.dll was loaded instead of v2.0.50727 fusion.dll. But SG.AG.Qt.Act.Client.Streams.dll and all other assemblies are developed in .Net v2.0.50727. So it crashed. Would anyone know why Windows chose .Net v1.1.4322 rather than v2.0.50727 to run my script? How can I indicate Windows to choose v2.0.50727 correctly? Thanks so much.

      *** Assembly Binder Log Entry (6/29/2007 @ 3:18:58 PM) ***

      The operation failed.
      Bind result: hr = 0x80131107. No description available.

      Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll
      Running under executable C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE
      --- A detailed error log follows.

      === Pre-bind state information ===
      LOG: Where-ref bind. Location = C:/WINDOWS/assembly/GAC_MSIL/SG.AG.Qt.Act.Client.Streams/4.5.0.0__ea69dc1d65f83a25/SG.AG.Qt.Act.Client.Streams.dll
      LOG: Appbase = C:\Program Files\Microsoft Office\OFFICE11\
      LOG: Initial PrivatePath = NULL
      LOG: Dynamic Base = NULL
      LOG: Cache Base = NULL
      LOG: AppName = NULL
      Calling assembly : (Unknown).

      LOG: Processing DEVPATH.
      LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
      LOG: Attempting download of new URL file:///C:/WINDOWS/assembly/GAC_MSIL/SG.AG.Qt.Act.Client.Streams/4.5.0.0__ea69dc1d65f83a25/SG.AG.Qt.Act.Client.Streams.dll.
      LOG: Assembly download was successful. Attempting setup of file: C:/WINDOWS/assembly/GAC_MSIL/SG.AG.Qt.Act.Client.Streams/4.5.0.0__ea69dc1d65f83a25/SG.AG.Qt.Act.Client.Streams.dll
      LOG: Entering run-from-source setup phase.
      ERR: Error extracting manifest import from file (hr = 0x80131107).
      ERR: Failed to complete setup of assembly (hr = 0x80131107). Probing terminated.

      C Offline
      C Offline
      cateyes99
      wrote on last edited by
      #2

      Thanks

      D 1 Reply Last reply
      0
      • C cateyes99

        Thanks

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Have a little patience man. You've got a problem that is not easily solved and takes some research. Open RegEdit, then open HKEY_CLASSES_ROOT, then find the CLSID folder, then the GUID for your class. You can also click on the CLSID folder and then search the values for your class name. Open the GUID for your class, then open teh InProcServer32 folder in there. In there, you should find a RuntimeVersion value that should read "v2.0.50727". If it doesn't have this value, this might be your problem. You might also want to look at this[^] MS KB article. There's a bug in Office when hosting .NET 2.0 components...

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        C 1 Reply Last reply
        0
        • D Dave Kreskowiak

          Have a little patience man. You've got a problem that is not easily solved and takes some research. Open RegEdit, then open HKEY_CLASSES_ROOT, then find the CLSID folder, then the GUID for your class. You can also click on the CLSID folder and then search the values for your class name. Open the GUID for your class, then open teh InProcServer32 folder in there. In there, you should find a RuntimeVersion value that should read "v2.0.50727". If it doesn't have this value, this might be your problem. You might also want to look at this[^] MS KB article. There's a bug in Office when hosting .NET 2.0 components...

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          C Offline
          C Offline
          cateyes99
          wrote on last edited by
          #4

          Thanks very much. It's quite helpful. All classes' InProcServer32 attributes are fine in the registry. Currently we've figured out a walkaround - placing an application configuration file to specify which .Net framework version to run the application.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups