Hey David,

You have to specify where Nant can locate these assemblies.

If the include pattern is a file name, then NAnt will also search for the
assembly in the list of reference assemblies for the current target
framework.

This list is defined using <reference-assemblies> filesets in the
<framework> node of the NAnt configuration file.

How are these assembly references define in MD?  If you're using package
references, then you can also use these in NAnt:

        <csc target="exe" output="gnome-rdp.exe" debug="${debug}">
                <sources>
                        <include name="src/*.cs" />
                </sources>
                <pkg-references>
                        <package name=gtk-sharp" />
                        <package name=gdk-sharp" />
                </pkg-references>
               <references>
                    <include name="System.dll" />
                    <include name="System.Data.dll" />
                </references>
        </csc>

Note:
This is just an example.

Hope this helps,

Gert

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Paleino
Sent: maandag 23 juni 2008 10:51
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Missing assemblies, though referenced

Hello *,
I'm trying to use NAnt to build a C# project under Debian GNU/Linux.
When I run it, as `nant build` (see below), I get:

[csc] /home/neo/code/c-sharp/gnome-rdp/src/SessionTreeView.cs(20,7): error
CS0246: The type or namespace name `Gtk' could not be found. Are you missing
a using directive or an assembly reference?
[csc]     Try using -pkg:gtk-sharp
[csc] /home/neo/code/c-sharp/gnome-rdp/src/SessionTreeView.cs(21,7): error
CS0246: The type or namespace name `Gdk' could not be found. Are you missing
a using directive or an assembly reference?
[csc]     Try using -pkg:gdk-sharp
[csc] /home/neo/code/c-sharp/gnome-rdp/src/SessionTreeView.cs(43,40): error
CS0246: The type or namespace name `TreeView' could not be found. Are you
missing a using directive or an assembly reference?
[csc] Compilation failed: 3 error(s), 0 warnings

Now, I effectively <include> those assemblies. I can't understand why it is
failing (the project builds fine under MonoDevelop).

Here's the "build" target:

<target name="build">
    <csc target="exe" output="gnome-rdp.exe" debug="${debug}">
        <sources>
            <include name="src/*.cs" />
        </sources>
        <references>
            <include name="gtk-sharp.dll" />
            <include name="gdk-sharp.dll" />
            <include name="glade-sharp.dll" />
            <include name="gnome-sharp.dll" />
            <include name="vte-sharp.dll" />
            <include name="System.dll" />
            <include name="System.Data.dll" />
            <include name="Gnome.Keyring.dll" />
            <include name="Mono.Posix.dll" />
            <include name="Mono.Data.SqliteClient.dll" />
        </references>
    </csc>
</target>


Kindly,
David

--
 . ''`.  Debian maintainer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/  `. `'`  GPG:
1392B174 ----|---- http://snipr.com/qa_page
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to