Hello all, I'm still having problems using NAnt... sorry for my newbieness :) Here's my "build" target:
<target name="build" [..]> <mkdir dir="${outdir}" /> <csc target="exe" output="${outdir}/gnome-rdp.exe"> <resources basedir="."> <include name="gui/*" /> <include name="icons/*" /> <include name="resources/*" /> </resources> <sources> <include name="src/*.cs" /> </sources> [..] </csc> </target> Running the built exe I have: Unhandled Exception: System.ArgumentException: Cannot get resource file 'gui.glade' Parameter name: resource_name at Glade.XML..ctor (System.Reflection.Assembly assembly, System.String resource_name, System.String root, System.String domain) [0x00000] at GnomeRDP.MainApp..ctor (System.String[] args) [0x00000] at GnomeRDP.MainApp.Main (System.String[] args) [0x00000] This obviously crashes the program. This is the involved line: Glade.XML gxml = new Glade.XML(null, "gui.glade", "wndMain", "gnome-rdp"); I also tried changing the above code to: Stream glade = Assembly.GetExecutingAssembly().GetManifestResourceStream("gui.glade"); Glade.XML gxml = new Glade.XML(glade, "wndMain", "gnome-rdp"); (using System.IO and System.Reflection), but this throws another exception: Unhandled Exception: System.ArgumentNullException: Argument cannot be null. Parameter name: s at Glade.XML..ctor (System.IO.Stream s, System.String root, System.String domain) [0x00000] at GnomeRDP.MainApp..ctor (System.String[] args) [0x00000] at GnomeRDP.MainApp.Main (System.String[] args) [0x00000] Both "types of code" work fine under MD. Thus I suspect something wrong in the way NAnt embeds resources -- or probably I'm missing something. Any help would be very appreciated. 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
signature.asc
Description: PGP signature
------------------------------------------------------------------------- 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