Hi Evan,
If you just want to find the location of the dll then you need to search the registry for that guid - or you might be able to use oleview to help. On my machine its %SystemRoot%\System32\shdocvw.dll


To use COM or ActiveX components from .net code you need to create wrapper assemblies using eiather tlbimp.exe or aximp.exe. So for

SHDocVw.dll the wrapper will be AxInterop.SHDocVw.dll. VisualStudio does this behind 
the scenes for you. NAnt has a TlbImp task and there is an AxImp task in NAntContrib.
Once you've created the wrappers ( or interop assemblies as they are correctly known ) you 
can reference them as you would any other assembly from your <csc> tasks.

Its probably worth reading up on both those commandline tools and the interop process 
in gereral - there is plenty of stuff on MSDN.

As for copying to the build directory you only need to copy the interop assemblies. 
The dlls they wrap will be located by the COM subsystem at runtime ( using the GUID 
lookup in the registry ).

Ian


Bonnett, Evan A wrote:

Hey guys,

Sorry to hit you up directly like this. I posted this but no one came to the
rescue.  Do you have any thoughts on this?  I'm just a bit in the dark here.
Let me know if I am being vague.

TIA,

Evan A. Bonnett
Reynolds and Reynolds, IT
ERA Integrated Desking Development
937-485-8577
58577


-----Original Message-----
From: Bonnett, Evan A Sent: Wednesday, August 11, 2004 1:42 PM
To: Nant-Users (E-mail)
Subject: XSLT Generated Build File with COM references



I am strong naming my assemblies now. What is the process to deal with COM and ActiveX components? I am running the csproj file through an XSLT to generate the Nant build file. Does anyone have a step by step on when to do what with these components?

One problem I am running into is that the actual dll file name is not what
the attribute name is in the csproj file.  Here is an example:

                        <Reference
                   Name = "SHDocVw"
                   Guid = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}"
                   VersionMajor = "1"
                   VersionMinor = "1"
                   Lcid = "0"
                   WrapperTool = "tlbimp"
                />
                <Reference
                   Name = "AxSHDocVw"
                   Guid = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}"
                   VersionMajor = "1"
                   VersionMinor = "1"
                   Lcid = "0"
                   WrapperTool = "aximp"
                />

But the actual dll names are AxInterop.SHDocVw.dll and Interop.SHDocVw.dll.
Anyone have a simple way to map the names?  Also, how do you resolve the
location of these dll's?  I am having trouble pulling these into the bin
folder when I build.  Is there a very flexible and generic way to resolve
the locations based on the GUID?  I am looking for a solution that can be
reused throughout the organization so it can't be project specific.

Thanks a bunch,



Evan A. Bonnett
Reynolds and Reynolds, IT





--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com




-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to