Take a look at the /imports switch. You can specify the assemblies there.

brant
...






From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Nant-users digest, Vol 1 #168 - 1 msg
Date: Sat, 08 Mar 2003 12:21:33 -0800

Send Nant-users mailing list submissions to
        [EMAIL PROTECTED]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/nant-users
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Nant-users digest..."


Today's Topics:


1. Re: best practice for including system dlls (Ian MacLean)

--__--__--

Message: 1
Date: Sat, 08 Mar 2003 17:32:15 +0900
From: Ian MacLean <[EMAIL PROTECTED]>
To: "Hearn, Bruce" <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: [Nant-users] best practice for including system dlls

Bruce,
references to the core system dlls are added automatically by csc using
the entries in its response file : 'csc.rsp'. i'm not sure about vb -
maybe the ide always adds these references automatically - it doesn't
appear to have a vbc.rsp.

if you want to directly reference the system assemblies its better to
use
${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll
since this will use the correct path for the version framework you are
using ie 1.0 or 1.1. This setting is available in the current cvs tree
but not in the 0.81 release.

I wonder if we should let bare files thru ie if they aren't prefixed by
a path just pass them along to the compiler anyway and let it try to
resolve them ?

Ian

> hi all,
>
> can anyone can tell me the best way to make sure that .NET System dlls are
> included in a project, without specifying a path like
> "c:\winnt\Microsoft.Net\...\System.Data.dll" - sometimes a developer will
> have their Winnt drive on d: or e:.
>
> Let me give an example, because I have to admit I don't understand how
> nant/csc works with this:
>
> <target name="compile" description="Compile project" depends="init">
> <csc target="${target.type}" output="${dir.output}\${project.output}"
> ... >
> <arg value="${unsafe}" />
> <arg value="/nowarn:1591" />
> <sources>
> <includes name="someclass.cs" />
> </sources>
> <references>
> <includes name="System.dll" />
> <includes name="System.Data.dll" />
> <includes name="System.Xml.dll" />
> </references>
> </csc>
> </target>
>
> But when I view the verbose nant output, the system dlls do not show up in
> the reference list! Not surprising, perhaps, because file sets will test for
> the existence of these dlls before passing the list to CSC/VBC. So how is
> it that compilation actually works for CSC when System.dll is not being
> included? And why does this not work for VB projects? Can anyone explain?
>
> Now, if I use the "ASIS" file set attribute:
>
> <includes name="System.Data.dll" asis="true" />
>
> This allows my VB dlls will compile as well. Presumably the System dlls in
> the GAC are being referenced.
>
>
> So my main question is, is it in general better to do something like this:
>
> <sysinfo />
> ...
> <includes
> name="${sys.env.systemroot}/Microsoft.Net/.../System.Data.dll" />
>
> or is it better to use the ASIS attribute to force inclusion?
>
> thanks in advance,
>
> Bruce
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
> for complex code. Debugging C/C++ programs can leave you feeling lost and
> disoriented. TotalView can help you find your way. Available on major UNIX
> and Linux platforms. Try it free. www.etnus.com
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users






--__--__--

_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users


End of Nant-users Digest


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail




-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to