Strong name signature not valid for this assembly Microsoft.mshtml.dll

时间:2022-02-20 22:17:18

Strong name signature not valid for this assembly Microsoft.mshtml.dll Strong name signature not valid for this assembly Microsoft.mshtml.dll

http://social.msdn.microsoft.com/Forums/windows/en-US/9b5a07e0-bb1f-4f3d-90fc-40777f1f5800/strong-name-signature-not-valid-for-this-assembly-microsoftmshtmldll?forum=winformssetup

Hi, people.

I believe that I solved the problem, definitively, for "Strong name signature not valid for this assembly Microsoft.mshtml.dll"

When we use a DLL witch is a ordinary Windows file the application, after installed by ClickOnce, try to use the system reference by the DLL, not that one Visual Studio used by build the our program.

Then, to solve that, we must enforce the use of the correct file...

  1. 1.       Open the “References” folder in Solution Explorer;
  2. 2.       Click over the DLL name;
  3. 3.       Look at property windows and certify you are using the correct version of DLL (in case of Microsoft.mshtml.dll, you must use the file in “C:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll”), verify it at property Path;
  4. 4.       Then, attrib the follow properties:
    • Copy Local = True
    • Specific Version = True

    After this, you are sure that the ClickOnce will install and enforce the use of the DLL that you referenced in your project, avoiding the wrong reference by the default file installed by the windows or the MS Office.