Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / September 2005

Tip: Looking for answers? Try searching our database.

How to compile Interop.SHDocVw.dll into the exe of an application?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Long Nguyen - 09 Sep 2005 19:06 GMT
Hi all,

In my VB .NET application, I create an instance of the Internet Explorer.  
The Visual Studio IDE dutifully generates a DLL named Interop.SHDocVw.dll in
the same directory as my executable.

The problem is, when I copied my executable to a different directory without
copying the Interop.SHDocVw.dll along with it, I ran the application and got
the exception 'System.IO.FileNotFoundException' (File or assembly name
Interop.SHDocVw, or one of its dependencies, was not found.)

The question is, how do I "compile" Interop.SHDocVw.dll into my executable
so that I don't have to deliver the application with two files?

I am sure many applications automate IE and if there's not a good solution
for this, many instances of Interop.SHDocVw.dll would be found on the same
hard drive.  Please help.  Thanks.

-Long
Mattias Sjögren - 09 Sep 2005 19:33 GMT
Long,

>The question is, how do I "compile" Interop.SHDocVw.dll into my executable
>so that I don't have to deliver the application with two files?

Try one of these tools

http://research.microsoft.com/~mbarnett/ilmerge.aspx
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B7560D78-
7384-41B0-8DDF-820137305E24


>I am sure many applications automate IE and if there's not a good solution
>for this, many instances of Interop.SHDocVw.dll would be found on the same
>hard drive.

Is that a problem?

Mattias

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Long Nguyen - 09 Sep 2005 22:11 GMT
Thanks for the help, Mattias.  The ILMerge tool works for me.

> >I am sure many applications automate IE and if there's not a good solution
> >for this, many instances of Interop.SHDocVw.dll would be found on the same
> >hard drive.
>
> Is that a problem?

Not a problem but more like a nuisance.  'Coz why should you have multiple
instances of the same thing all over the place?

BTW, I tried to include Interop.SHDocVw.dll in my MSI package but it's not
allowed.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.