An htmleditor and winform program is applied in a system. Microsoft. mshtml. dll must be referenced.
Therefore, this file under. net is referenced. Add reference>. net> select Microsoft. mshtml.
The development process is complete without any problems. However, when deployed to another machine, the referenced Microsoft. mshtml. dll cannot be found. There are no files similar to mshtml. dll in the program directory.
It seems that Microsoft. mshtml. dll has a problem. Search for it online:
Get the following article: What is Microsoft. mshtml? Http://www.cnblogs.com/waxdoll/archive/2005/04/08/134196.html)
Read carefully: there was a reference to mshtml in the COM component reference. There are two mshtml in total. (Referenced in the following Original article ):
. NET system comes with an mshtml. in theory, the Interop encapsulation of dll cannot be separated from COM, but since it is encapsulated by Interop. the use of the. NET environment is definitely better than calling the COM component directly.
At first, I thought about copying Microsoft. mshtml. dll to the program directory on drive C. I searched for it and found that the problem was serious. This is a 2.98 MB big guy. But can I not reference this?
Fortunately, two other good things appeared during the search: WindowsLive. Writer. Interop. Mshtml. dll (165 k) and WindowsLive. Writer. Mshtml. dll (113 k ).
Therefore, the Microsoft. mshtml. dll reference is deleted in the program, and the dll reference of K is replaced. After changing to WindowsLive. Writer. Interop. Mshtml. dll (165 k), you can finally succeed. Well, mshtml. dll with this small block header can replace the Microsoft. mshtml. dll of 3 m, which is good and good.
Then, open the Object Browser and compare the two dll files. As expected, the small dll is also an encapsulation for mshtml COM. WindowsLive. Writer. Interop. Mshtml. dll is in Live Writer. LiveWriter also has an htmleditor, which is similar to the htmleditor I use now.
I posted my blog and forwarded it here.