Reading the list's suggestions I was able to solve the problem.  Indeed by
just tlbimp-ing my com dlls first, then referring to those wrapper-ed
versions, I was able to build no problem.

Thanks to all that replied, it really helped us on our deadline.

--Mike Duncan

----- Original Message ----- 
From: "Ian MacLean" <[EMAIL PROTECTED]>
To: "Bernard Vander Beken" <[EMAIL PROTECTED]>
Cc: "Mike Duncan" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, August 07, 2003 11:05 PM
Subject: Re: [Nant-users] Com dll metadata?


> Bernard,
> this is the correct way to do this. I guess it would be possible to
> detect that the reference is a com dll or typlelib and automatically
> invoke tlbimp. I don't think that is particularly advisable though.
>
> Another approach is to use tlbimp.exe to manually build the wrapper
> assembly once and then store it in source control.  There should be no
> need to re-generate it unless the underlying com code ( just interfaces
> actually ) changes.
>
> Ian
>
> >Hello Mike,
> >
> >The C# compiler expects to find .NET metadata in the specified file,
which cannot be found in the COM DLL.
> >
> >I would use the tlbimp task to generate a .NET wrapper for the COM DLL,
then specify that wrapper DLL as a reference to the C# compiler.  This task
is included in the latest NAnt release candidate.
> >
> >If someone knows an easier way to handle this, let me know.
> >
> >HTH,
> >
> >Bernard
> >
> >-----Original Message-----
> >From: Mike Duncan [mailto:[EMAIL PROTECTED]
> >Sent: Thu 8/7/2003 18:37
> >To: [EMAIL PROTECTED]
> >Cc:
> >Subject: [Nant-users] Com dll metadata?
> >I'm compiling C# and sucessfully referencing a bunch of .NET dlls in my
build.  The problem is when the compiler gets to a 3rd party dll which is
COM, I get the following ....
> >
> >fatal error CS0009: Metadata file
'c:\cvs\tn_pos\TicketNetwork\dll\FDXParser.dll' could not be opened -- 
'There isn't metadata in the memory or stream'
> >
> >This all compiles fine from VStudio.
> >
> >My references look like this:
> >            <references>
> >                <includes name="${dlls.dir}\*.dll"/>
> >                <includes name="C:\Program Files\Common Files\Crystal
Decisions\1.0\Managed\*.dll"/>
> >             </references>
> >
> >And i have unsafe = "true" on my csc line.
> >
> >Not sure what what I'm up against here, any help would be appreciated.
> >
> >-- Mike Duncan
> >-- [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> >
> >-------------------------------------------------------
> >This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> >Data Reports, E-commerce, Portals, and Forums are available now.
> >Download today and enter to win an XBOX or Visual Studio .NET.
>
>http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> >_______________________________________________
> >Nant-users mailing list
> >[EMAIL PROTECTED]
> >https://lists.sourceforge.net/lists/listinfo/nant-users
> >
> >
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
>
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
> -
>
>

-



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to