.NET 學習

.NET 學習生活感想... 万事成蹉跎..... 贵在坚持 及时整理自己做过和学过的东西

博客园 首页 新随笔 联系 订阅 管理

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.

posted on 2013-12-24 11:27  Tonyyang  阅读(874)  评论(0编辑  收藏  举报
欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/