Could not load file or assembly 'Microsoft.mshtml … Strong name validation failed

前端 未结 4 584
时光取名叫无心
时光取名叫无心 2020-12-05 14:26

I made a WPF/C# program and I am using the internet control for WYSIWYG HTML editing.

it is a regular Executable program.

it works on most computers however

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 15:27

    Verify that the 'Microsoft.mshtml.dll' file, distributed with the program is the PIA file and not an Office file. Some sites claims that the Office files are "delay signed" and the PIA file (installed with the VS installation) is a signed copy. on my computer I have 3 different versions of 'Microsoft.mshtml.dll' file, (same file-size, but different content):

    1. "c:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.mshtml.dll"

    2. "c:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office12\Microsoft.mshtml.dll"

    3. "c:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll"

    Remove "Microsoft.mshtml.dll" reference from the project. Use "Add Reference", ".Net" tab, select the PIA file, use "copy loacal" option. (It worked for me . . .)

    Atara

提交回复
热议问题