Precautions for using htmleditor in winform to reference Microsoft. mshtml

Source: Internet
Author: User

Recently, an htmleditor in winform references a Microsoft. mshtml is running locally (with vs installed), but is sent to the test (without vs installed, only the Runtime Library). The result page does not appear. After a long time, it has been online.ArticleNow, let's sort it out:

 

Taking the personal machine as an example, the troubleshooting method of mshtml is summarized as follows:

1. c: \ windows \ system32 \ mshtml. dll is called under Win32 and cannot be used by net.

2. view the c: \ Program Files \ Microsoft. NET \ primary InterOP assemblies \ Microsoft. mshtml. dll file. If this file exists, you can copy the file andProgramReference this file. During installation on the client, it must be packaged and installed together. If you do not have this file, try c: \ windows \ Microsoft. run regasm.exe in the net \ framework \ v2.0.50727directory and register 1. mshtml. DLL component. After registration, the dll appears in the primary InterOP assemblies directory.

3. in the environment where the net SDK is installed, both Visual Studio 2005 and Visual Studio 2008have sdks installed. You can run gacutil.exe and run Microsoft under the primary InterOP assemblies directory. mshtml. DLL is registered in the Global Assembly Cache. Therefore, when running a program, the program does not need to carry Microsoft. mshtml. DLL moved together.

In addition, a> generally, there is an sdk in the development computer, so you can. mshtml. DLL is registered in the Global Assembly Cache, but it is usually only installed on the client. net Framework, or let the program take Microsoft. mshtml. it is more convenient to run DLL together.

B> In addition, sometimes we can go to the C: \ Program Files \ Microsoft Visual Studio 9.0 \ Visual Studio Tools for office \ Pia \ office11 directory or C: this component is found in the \ Program Files \ Microsoft Visual Studio 9.0 \ Visual Studio Tools for office \ Pia \ office12 directory. Do not use these DLL. Net requires a DLL with a strong name. These are not applicable.

Suggestions

We recommend that you put the mshtml file in the installation package and set registration to avoid any problems.

In the installation project --> "add" --> "assembly", find the path as"

C: \ Program Files \ Microsoft. NET \ primary InterOP assemblies \" Microsoft. mshtml, and then attribute "register" --> "vsdracomrelativepath", OK. Just release it.

 

 

References:

Use of mshtml in Net

 

 

Http://www.cnblogs.com/oooo/archive/2009/05/21/1486509.html

 

Mshtml component reference

 

 

Http://www.cnblogs.com/catcn/archive/2009/06/11/1501266.html

An error solution for deploying mshtml assembly in winform

Http://www.cnblogs.com/downmoon/archive/2010/03/08/1680834.html

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.