tags:

views:

622

answers:

2

Hi, I'm trying to run a 32 bit application (built as x86) on a 64 bit machine. I built it as x86 because it uses a 32 bit com object. Until I did this, the app couldn't load the com. Now it loads the com, but complains that it can't find microsoft.mshtml assembly. THis assembly is used by one of the (.net) dependencies.

The error message is: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Couldn't find File name: 'Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

I can see this assembly registered both under CLSID and under WOW3264NodeCLSID. However, it's not found in teh WIndows\Assembly directory.

I tried to copy the dll from the computer I built the app on and put in the app directory. Then, when I tried to run the app, I got a security error about strong naming. I googled the error and found that the assembly should be added to the GAC. I tried to do it by dragging the dll into \windows\assembly, but this didn't work either. It gave me an error message about private\public key. I enabled binding logging and that's what I get: === Pre-bind state information ===

LOG: DisplayName = Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified) LOG: Appbase = file:///C:/DT/IEService/bin/Debug32bit/ LOG: Initial PrivatePath = NULL Calling assembly : HTMLConverter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6ec4c8772a0842ff.

LOG: This bind starts in default load context. LOG: Using application configuration file: C:\DT\IEService\bin\Debug32bit\ServiceConsole.exe.Config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Post-policy reference: Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a LOG: The same bind was seen before, and was failed with hr = 0x80070002.

What should I do??? Any help will be more than appreciated. Thanks

A: 

Run fslogvw on the machine to capture additional information about the assembly binding failure. That should help run down the cause.

Paul Alexander
I've edited my post by adding the binding logging I get. Is this enough?
The log looks like you might have started fuslogvw after the app was already running. Make sure you have it running and logging all binds.
Paul Alexander
A: 

I haven't been running fuslogvw, I've added a key to registry, that is supposed to enable logging of binding problems. Now I want to run fuslogvw on the target machine. I've read that it should be run from sdk prompt. Does this mean that MS Visual Studio should be installed there? How can I run this application? Thanks