Title: Message
Hi Bill,
 
I've updated the readme with the following content :
 
=============================================================================
 
How to use NAntContrib tasks in NAnt?
---------------------------------------------------------
In order to use NAntContrib tasks in NAnt, you can use one of the following procedures:
 
1. Use the <loadtasks> task in your build file(s) to tell NAnt which assembly to scan for tasks
 
For example:
 
<project name="NAntContrib" default"test">
 <target name="test">
  <loadtasks assembly="c:/nantcontrib-0.85/bin/NAnt.Contrib.Tasks.dll" />
  ...
 </target>
</project>
 
In order to avoid updating all build files when you move the NAnt.Contrib.Tasks assembly to another
directory, you could register the directory containing the NAnt.Contrib.Tasks assembly in an
environment variable and then use the value of that environment variable in your build files.
 
For example:
 
<project name="NAntContrib" default"test">
 <target name="test">
  <loadtasks assembly="${path::combine(environment::get-variable('NANTCONTRIB_DIR'), 'bin/NAnt.Contrib.Tasks.dll')}" />
  ...
 </target>
</project>
 
This example assumes you've registered an environment variable named "NANTCONTRIB_DIR", holding the
path to NAntContrib (eg. c:\nantcontrib-0.85).
 

2. Copy the content of the NAntContrib bin directory to the NAnt directory
 
In order to make certain tasks available to every build file, you can copy the tasks assembly and
all its dependencies to the "<nant>\bin\tasks" directory.
 
However, as NAntContrib contains tasks that rely on COM Interop, it is only supported on the .NET
Framework (not on Mono). So, in order to avoid issues when running NAnt on Mono, you should copy
the content of the NAntContrib bin directory to "<nant>\bin\tasks\net". This will ensure that
NAnt only loads the NAntContrib tasks when running on one of the MS .NET Framework runtimes.
 
Note: you'll have to manually create the "tasks\net" subdirectories.
 

3. Modify NAnt configuration file (not recommended)
 
An <include> element can be added to the <task-assemblies> node in the <framework> node for
the .NET Framework version that you intend to use. The "name" attribute of the <include> element 
should hold the absolute path to NAnt.Contrib.Tasks.dll.
 
For example:
 
 <framework 
        name="net-1.1" 
        family="net" 
        version="1.1"
        description="Microsoft .NET Framework 1.1"
        ....
 >
         <task-assemblies>
               ...
               <include name="c:/nantcontrib-0.85/bin/NAnt.Contrib.Tasks.dll" />
                ...
        </task-assemblies>
    ....
 </framework>
 
You would need to repeat this for all .NET Framework versions that you intend to use.
 
Note: The NAnt configuration file (NAnt.exe.config) is considered internal, and might change without
      noticed.
=============================================================================
 
I've modified our packaging to include the readme.txt in both the source & binary distributions.
 
Thanks for reporting this !
 
Gert
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Arnette
Sent: donderdag 9 december 2004 23:08
To: [EMAIL PROTECTED]
Subject: RE: [Nant-users] Invalid element <vssget>. Unknown task or datatype.

Gert,
 
There are no instructions in the documentation for NAnt nor NAntContrib about how to use NAntContrib.  Like most people, I also just copied the dlls to the NAnt\bin directory because there was no guidance otherwise.  I looked all over today and the only thing I could find about NAntContrib usage was an example for the <loadtasks> task.  Based on another thread here I have switched to adding an include element to Nant.Exe.Config.
 
The Readme for NAntContrib (which is not in the binary distribution by the way) only says how to build NAntContrib; nothing about how to use it after it's built.
 
Perhaps this is something that should be added before 0.85 is released.
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig Wagner
Sent: Thursday, December 09, 2004 4:14 PM
To: [EMAIL PROTECTED]
Subject: RE: [Nant-users] Invalid element <vssget>. Unknown task or datatype.

I wasn't paying attention and originally sent this to Gert instead of the list. Apologies.
 
I'm interested in your PS comment. I thought that the NAntContrib assemblies were all private so I just copied them to the nant\bin folder. Should I have installed them in the GAC or is there an entry in the nant.exe.config that I missed?
 
What approach should I have used?


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gert Driesen
Sent: Wednesday, December 08, 2004 11:26 PM
To: 'Andy Eunson'; [EMAIL PROTECTED]
Subject: RE: [Nant-users] Invalid element <vssget>. Unknown task or datatype.

Hi Andy,
 
I noticed that you copied the NAnt.Contrib.Tasks assembly to your nant bin directory. Did you also copy all other files (eg. Interop.WindowsInstaller.dll) from the NAntContrib bin directory to the NAnt bin directory ?
 
Gert
 
PS. This is why I discourage copying the NAntContrib binaries to the NAnt bin directory ;)


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Eunson
Sent: donderdag 9 december 2004 6:23
To: [EMAIL PROTECTED]
Subject: [Nant-users] Invalid element <vssget>. Unknown task or datatype.

 

This appears to be a 1.1 related problem. I had a very similar issue with the solution task in nant .85 using the dist assemblies on a machine that only has NET1.1. The solution there was to use the 85RC1 dist to build the 85RC1 source (you can’t build 85 with 84). Once I did that solution magically starts to work.

 

Nonetheless this is what I’m seeing when using 85RC1 built locally with NET1.1 and NantContrib Dist assemblies.

 

 

[loadtasks] Failure scanning "C:\Program Files\nant\bin\NAnt.Contrib.Tasks.dll" for extensions. One or more of the types in the assembly unable to load.

Buildfile: file:///D:/Data Files/Code/Solutions/SC.MasterBuild/Test/Test.build

Target(s) specified: Get_Source

 

 

Get_Source:

 

     [echo] Getting Phoenix Source tree...

 

BUILD FAILED

 

D:\Data Files\Code\Solutions\SC.MasterBuild\Test\Test.build(8,4):

Invalid element <vssget>. Unknown task or datatype.

 

 

I tried to build NantContrib using 1.1 and get the following

 

 

[loadtasks] Failure scanning "C:\Program Files\nant\bin\NAnt.Contrib.Tasks.dll" for extensions. One or more of the types in the assembly unable to load.

Buildfile: file:///C:/Program Files/nant/NANTCONTRIB/Source/nantcontrib-0.85-nightly/NAntContrib.build

Target(s) specified: test

 

 

init:

 

 

debug:

 

 

set-framework-configuration:

 

 

set-net-1.1-framework-configuration:

 

 

BUILD FAILED

 

C:\Program Files\nant\NANTCONTRIB\Source\nantcontrib-0.85-nightly\NAntContrib.build(42,14):

Please pass the folder containing the NAnt build on the commandline as a property (-D:nant.dir=???).

 

Total time: 0.2 seconds.

 

I try “nant –d:nant.dir=C:\progra~1\nant\bin” but that doesn’t work. What am I missing?

Reply via email to