Re: [Nant-users] get version from dll?

2004-04-30 Thread Ian MacLean
It could be that it doesn't like the UNC path. It worked frin for me with a local path. Try copying that code into a small c# console app and you'll get the full exception information. From the looks of it we aren't propagating that exception to the user when a function fails. Jarek, is that th

Re: [Nant-users] get version from dll?

2004-04-30 Thread Ian MacLean
Jaroslaw Kowalski wrote: Please, don't do this kind of tricks. It is like shooting yourself in the foot. Functions (by definition) should be side-effect-free and nobody is advised to do otherwise. whatever - I was just seeing if I could reproduce what that script was doing in a function. I wa

RE: [Nant-users] delete all files and folders in a directory

2004-04-30 Thread Noel Gifford
Gert, I'd like a parameter added to the delete task (or maybe the fileset task) specifying whether directories should be deleted. When I used the task I expected only the files to be removed. Bob, I sent this back on April 5th. Guess it didn't get through. Bob, The script below in

Re: [Nant-users] get version from dll?

2004-04-30 Thread Jaroslaw Kowalski
Hi Ian! Please, don't do this kind of tricks. It is like shooting yourself in the foot. Functions (by definition) should be side-effect-free and nobody is advised to do otherwise. I was just going to propose a patch that would prevent ANY writes to property dictionary during property evaluation,

RE: [Nant-users] get version from dll?

2004-04-30 Thread Bob Archer
OK... so what am I doing wrong... I get the following error: C:\nant\qa.build(22,3): Function call failed. Expression: ${script::get-file-version('\\devevolution\C$\DailyBuild\bin\Geac.Fi nancials.Business.dll')} ^^

RE: [Nant-users] delete all files and folders in a directory

2004-04-30 Thread Bob Archer
I guess I should clarify this:   I still can’t seem to delete all files and folders in a directory…   WITHOUT deleting that directory.   BOb   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Bob Archer Sent: Friday, April 30, 2004 2:11 PM To: [EMAIL PROTECTED

[Nant-users] delete all files and folders in a directory

2004-04-30 Thread Bob Archer
I still can’t seem to delete all files and folders in a directory… what is the correct pattern. Here is what I have:                    

Re: [Nant-users] get version from dll?

2004-04-30 Thread Ryan Cromwell
Man - i can't wait until 0.85 is release :)  I'd love to start using functions, but we just can't concider using a nightly for a production buildsserver. Original Message Follows From: Ian MacLean <[EMAIL PROTECTED]> To: Ian MacLean <[EMAIL PROTECTED]> CC: "Price, Henry" <[EMAIL PROTECT

Re: [Nant-users] get version from dll?

2004-04-30 Thread Ian MacLean
actually you can set the properties from the function as well. Like:
public string GetFileVersion( string file, bool setProperties ) {
System.Diagnostics.FileVersionInfo myFileV

RE: [Nant-users] get version from dll?

Title: Message Henry,   This worked great…. A small change I had to add .ToString() to the assignment statements and close the method brace.  

   


RE: [Nant-users] get version from dll?

Ian, You are WAY beyond me. I am just learning to use the existing tasks, never mind write my own. :) -Original Message- From: Ian MacLean [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 11:40 AM To: Bob Archer Cc: [EMAIL PROTECTED] Subject: Re: [Nant-users] get version from dll?

RE: [Nant-users] get version from dll?

Title: Message Wow… that looks promising. But, ??? Does this task run automatically? How would I access this info… would it be:   ${dll.majorversion}   ???   Thanks a lot, Bob     From: Price, Henry [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 11:41 AM To: Bob

Re: [Nant-users] get version from dll?

If your dll is a .net assembly you could load it using Assembly.LoadFrom somthing like: assembly = Assembly.LoadFrom( AssemblyPath ); AssemblyName name = assembly.GetName(); version = name.Version.ToString(); should do the trick. Its a good candidate for a custom function. For extra points load

RE: [Nant-users] get version from dll?

I could look at any of the assembly dll's. When I did a build I create assemblyinfo file with nant... If I could not read that version number back out off the DLL for this in some way... ??? Although I think the File System Object will report the version of a file whether it is native dll, assembl

RE: [Nant-users] get version from dll?

Title: Message How about something like this? (off the top of my head and without intellisense :)   We've done something similar here - for checking which versions of files are installed etc - had to do it all in script - I've given up on writing custom tasks, they take too long to edit when

Re: [Nant-users] nested under compiler tasks

Merrill Cornish wrote: The various NAnt compiler tasks all have nested under the task. The plural names implies it's a specialized version of fileset, allowing one task invocation to compile, say, a whole diredctory full of source. This is correct. You can compile a whole directory of source

Re: [Nant-users] get version from dll?

Bob, There's no task or function for this right now. Is that an assembly or a native dll you're talking about ? Gert - Original Message - From: "Bob Archer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 30, 2004 5:20 PM Subject: [Nant-users] get version from dll? Hi

[Nant-users] get version from dll?

Hi All,   I am creating a build script that deploys our last successful daily build to our QA machine.   How could I get the version/build number from a dll? Any ideas? I could get the last build number from the build number file that my version task uses, however, if that build failed

[Nant-users] nested under compiler tasks

The various NAnt compiler tasks all have nested under the task. The plural names implies it's a specialized version of fileset, allowing one task invocation to compile, say, a whole diredctory full of source. However, the only examples in the NAnt help is one compiling a single hello world pr

Re: [Nant-users]

Hi Merrill, There might be a better way to do this now, but you can have access to the project object within your scripts, which in turn gives you access to the properties. If you modify a property in the script, the property is then modified as far as the build script is concerned. The objects

[Nant-users]

I believe I can see how I could use the task to run code that does things in the outside world, but can it interact with the NAnt script itself? Are ${propertyName} elements substituted inside CDATA strings? Is there any way for a script to set a property that the rest of the NAnt script can