Interop.Scripting.DLL .NET .NOOB

sevensilly

Member
Joined
May 8, 2007
Messages
10
Programming Experience
1-3
Hi Guys,

I'm just getting my feet wet in VB.Net but I consider myself somewhat versed in vbscripting so not all of it is new to me.

What I'm doing is writing a Windows app that I've already written as a vbScript- part of the script uses the FileSystemObject class. So what I've done is referenced scrrun.dll in my project. Consequently, this created a file called Interop.Scripting.DLL.

My question is why did referencing a DLL file produce another one? Is this a .NET requirement? Also, could someone explain to me what you're actually doing when you reference a .NET or .COM object? Would I be correct in saying that that purpose of referencing is to be able to use classes within the referenced library?

Secondly after compiling the project, I copied the executable to a different directory and tried to execute it. It complained because it did not find Interop.Scripting.DLL in the same directory. Is there anyway I can compile this executable so that it doesn't require additional DLL files? Maybe have it just reference SCRRUN.DLL? TIA.
 
The interop is generated and provides a managed wrapper for the COM type library, it is needed.

You are correct with the saying of references.

You have to bundle the needed files if deploying manually, using ClickOnce or other installer is preferred for deployment.
 
The interop is generated and provides a managed wrapper for the COM type library, it is needed.

Thank you for your response. Could you explain a little bit more? Does this mean that the created DLL is a translation of the .COM library to a .NET library so that .NET can "understand" it?
 
Back
Top