While this method is not the recommended procedure, it does have the nice property that you can use the <nantschema> task to produce a schema that will contain all the NAnt, NAntContrib, and Custom tasks specified in the nant.exe.config. This is very useful since there is no other way to create a schema for NAntContrib or Custom tasks.
Perhaps a new task (or functionality added to <nantschema>) could allow a user to create a schema for other assemblies containing tasks. For example, I could create three schemas, NAnt, NAntContrib, and Custom. Each of the three schemas can have a different namespace. Then I can use the namespaces to distinguish between the tasks in my build allowing me to track where the tasks are coming from and reminding me to make sure that I <loadtasks> the appropriate assemblies. Just a thought... -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gert Driesen Sent: Wednesday, September 29, 2004 9:50 AM To: Matt Hulse; 'Rick Casey'; [EMAIL PROTECTED] Subject: Re: [Nant-users] NantContrib [loadtasks] Matt, While that will ofcourse work, its definitely not the recommended procedure. Gert ----- Original Message ----- From: "Matt Hulse" <[EMAIL PROTECTED]> To: "'Rick Casey'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, September 29, 2004 6:04 PM Subject: RE: [Nant-users] NantContrib [loadtasks] >I found a great way to do this without using <loadtasks>. > > > > Here is a snippet from my nant.exe.config file in the nant bin folder. > > > > <!-- nant config settings --> > > <nant> > > <frameworks> > > <platform name="win32" default="auto"> > > <task-assemblies> > > <!-- include NAnt task assemblies --> > > <include name="*Tasks.dll" /> > > <!-- include NAnt test assemblies --> > > <include name="*Tests.dll" /> > > <!-- include framework-neutral assemblies --> > > <include name="tasks/*.dll" /> > > > > > > <!-- I added these!!! --> > > <!-- include nant_contrib task assemblies --> > > <include name="c:/nant_contrib/bin/*.dll" /> > > <!-- include my custom nant task assemblies --> > > <include name="c:/mynant/bin/*.dll" /> > > > > > > > <!-- exclude Microsoft.NET specific task assembly > --> > > <exclude name="NAnt.MSNetTasks.dll" /> > > <!-- exclude Microsoft.NET specific test assembly > --> > > <exclude name="NAnt.MSNet.Tests.dll" /> > > </task-assemblies> > > > > > > I saw this on a Blog somewhere. I'm sorry I don't remember whose it was > to > give proper credit, but I think this is a very elegant way to handle nant > contrib. and custom tasks without destroying the encapsulation of the nant > build. It may not be as efficient, code wise, but it's less work for me > (the lazy type) because I don't have to use <loadtasks>. > > > > > > Happy NAnting! > > > > Matt Hulse > > [EMAIL PROTECTED] > > > > > > > > > > > > > > _____ > > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Rick Casey > Sent: Wednesday, September 29, 2004 9:34 AM > To: [EMAIL PROTECTED] > Subject: RE: [Nant-users] NantContrib [loadtasks] > > > > Here's what I did... > > Just had to define the path to nantcontrib. > > I really try to avoid copying the 'bin' folders these days. God know what > could happen. > > > > <loadtasks assembly="${nantcontrib.dir}\bin\NAnt.Contrib.Tasks.dll" /> > <vssget > > user="${project.vss.readonly.username}" > > password="${project.vss.readonly.password}" > > localpath="${path::combine(current.build.dir, 'Applications')}" > > dbpath="${project.vss.database}" > > path="$/Applications" > > recursive="true" > > writable="true" > > replace="true" > > removedeleted="true" /> > > > > Rick. > > > > > > > > ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users