RE: [Nant-users] How can I list items once and use them in multip le targets?

2005-02-07 Thread Byrd, Payton
Title: RE: [Nant-users] How can I list items once and use them in multiple targets?





I have blogged on this subject:


http://blogs.ittoolbox.com/visualbasic/dotnet/archives/002467.asp


I'll summarize for the lists benefit:


I created a CSV file to hold a list of projects to build.  I use a three-layer build system.


1) default.build - Bootstrapper.  Reads the CSV file and loops through it using  and performs a  on each project for each target.

2) projecttemplate.build - Project builder.  Uses an  to drive the behavior of the targets in projecttemplate.build.

3) filesets.xml - Configuration file that contains a  that has properties, named filesets and named namespaceimports sets containing all of the data necessary to control projecttemplate.build's behavior.

Payton Byrd
Trane eBusiness
QED Team
Phone: 931-905-5386 
Fax: 931-648-5901


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Noel Llopis
Sent: Sunday, February 06, 2005 9:21 PM
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] How can I list items once and use them in multiple targets?


I'm currently using Nant with some exec tasks to compile some Visual C++ 
projects directly (through devenv). Because of how things are, I want to 
compile the projects, not the solution.


I could set up something along these lines (I know this is not correct 
syntax, but it should help explain the point):


  
    
    
    
    
    
    
    
    
  


Of course, I also want to compile the projects in release mode (and in 
several other configurations). What's the best way to do that without 
having to duplicate all the project names again? 


Ideally, I would like something like with make files:


  
    
    
    project1
    project2
    project3
    project4
    


    
    
    


    
    
    


    
  


Is something like that possible? I know about the trick of putting debug 
into a variable and having the "build" target use it, but that means that 
Nant won't build both debug and release without deleting the object files 
first. 


I'm sure it has to be something simple, but I haven't been able to find 
anything like that in the documentation. Thanks.




--Noel
Games from Within
http://www.gamesfromwithin.com



---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users





[Nant-users] devenv and nant yield different build results

2005-02-07 Thread patrick . oor

Hi folks,

My current development project uses a Perl script, which invokes devenv to build solutions in the correct order. I am investigating the use of NAnt as an alternative. However, I cannot generate the same dll with NAnt as with devenv :-(

I have tried different ways to generate my build scripts (e.g., writing them myself, or generating them via SlingShot), but that did not matter for the result. 

Is there someone who could explain (or suggest an explanation for) the different build results between NAnt and devenv?

Any help appreciated.

With kind regards,

--
Patrick Oor, Medical IT, Philips Medical Systems, Best, The Netherlands
e-mail: [EMAIL PROTECTED]

RE: [Nant-users] devenv and nant yield different build results

2005-02-07 Thread Gert Driesen



Hi Patrick,
 
What project types are you using (C#, VB, C++, ...) ? 
What difference are you noticing ?  What version of NAnt are you using 
?
 
Gert

  
  
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of 
  [EMAIL PROTECTED]Sent: maandag 7 februari 2005 
  15:28To: nant-users@lists.sourceforge.netSubject: 
  [Nant-users] devenv and nant yield different build 
results
  Hi folks, My current development project uses a Perl script, 
  which invokes devenv to build solutions in the correct order. I am 
  investigating the use of NAnt as an alternative. However, I cannot generate 
  the same dll with NAnt as with devenv :-( I have tried different ways to generate my build scripts (e.g., writing 
  them myself, or generating them via SlingShot), but that did not matter for 
  the result. Is there someone who 
  could explain (or suggest an explanation for) the different build results 
  between NAnt and devenv? Any help 
  appreciated. With kind 
  regards, --Patrick Oor, 
  Medical IT, Philips Medical Systems, Best, The Netherlandse-mail: 
  [EMAIL PROTECTED]


Re: [Nant-users] devenv and nant yield different build results

2005-02-07 Thread Brad Wilson
That's a tough question. What DEVENV does internally is a bit of a
mystery, since Microsoft doesn't provide the source code for it.

You can always call DEVENV from within NAnt. There's nothing binding
you to using the  task or some XSL-T transform, unless your
goal is to remove Visual Studio from the build machine. If you're
comfortable having VS on the box, why not just call DEVENV?

- Brad

On Mon, 7 Feb 2005 15:27:58 +0100, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Is there someone who could explain (or suggest an explanation for) the
> different build results between NAnt and devenv?


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


RE: [Nant-users] devenv and nant yield different build results

2005-02-07 Thread patrick . oor

Hi Gert,

Thanks for the quick response. 

I am using C# projects. My version of NAnt is nant-0.85-rc1. 

An example of a difference: 
- with devenv I get a dll sized 20 k bytes
- with NAnt the 'same' dll is sized only 8 k bytes

I did not bother to do any further comparison on that.

Kind regards,

--
Patrick Oor, Medical IT, Philips Medical Systems, Best, The Netherlands
e-mail: [EMAIL PROTECTED], phone: +31 40 27 62980











"Gert Driesen" <[EMAIL PROTECTED]>
02/07/2005 03:45 PM

        
        To:        Patrick Oor/EHV/TASS/[EMAIL PROTECTED]

        cc:        
        Subject:        RE: [Nant-users] devenv and nant yield different build results
        Classification:        




Hi Patrick,
 
What project types are you using (C#, VB, C++, ...) ? What difference are you noticing ?  What version of NAnt are you using ?
 
Gert


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: maandag 7 februari 2005 15:28
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] devenv and nant yield different build results


Hi folks, 

My current development project uses a Perl script, which invokes devenv to build solutions in the correct order. I am investigating the use of NAnt as an alternative. However, I cannot generate the same dll with NAnt as with devenv :-( 

I have tried different ways to generate my build scripts (e.g., writing them myself, or generating them via SlingShot), but that did not matter for the result. 

Is there someone who could explain (or suggest an explanation for) the different build results between NAnt and devenv? 

Any help appreciated. 

With kind regards, 

--
Patrick Oor, Medical IT, Philips Medical Systems, Best, The Netherlands
e-mail: [EMAIL PROTECTED]



RE: [Nant-users] devenv and nant yield different build results

2005-02-07 Thread Ryan Davis








Could one be doing a
debug build and the other a release?

 



Thanks,
Ryan 











From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Monday, February 07, 2005
9:58 AM
To:
nant-users@lists.sourceforge.net
Cc: Gert Driesen
Subject: RE: [Nant-users] devenv
and nant yield different build results



 


Hi Gert, 

Thanks
for the quick response. 

I
am using C# projects. My version of NAnt is nant-0.85-rc1. 

An
example of a difference: 
-
with devenv I get a dll sized 20 k bytes 
-
with NAnt the 'same' dll is sized only 8 k bytes 

I
did not bother to do any further comparison on that. 

Kind
regards, 

--
Patrick Oor, Medical IT, Philips Medical Systems, Best, The Netherlands
e-mail: [EMAIL PROTECTED], phone: +31 40 27 62980 




 
  
   
  
  
  
  
  
  
  
  "Gert Driesen"
  <[EMAIL PROTECTED]> 
  02/07/2005 03:45 PM 
  
  
          
   
        To:        Patrick
  Oor/EHV/TASS/[EMAIL PROTECTED]
   
   
        cc:         
   
        Subject:        RE: [Nant-users]
  devenv and nant yield different build results 
         
  Classification:         
  
 





Hi Patrick, 
  
What project types are you using (C#, VB, C++, ...) ? What
difference are you noticing ?  What version of NAnt are you using ?

  
Gert 







From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: maandag 7 februari 2005 15:28
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] devenv and nant yield different build results


Hi folks, 

My current development project uses a Perl script, which invokes devenv to
build solutions in the correct order. I am investigating the use of NAnt as an
alternative. However, I cannot generate the same dll with NAnt as with devenv
:-( 

I have tried different ways to generate my build scripts (e.g., writing them
myself, or generating them via SlingShot), but that did not matter for the
result. 

Is there someone who could explain (or suggest an explanation for) the
different build results between NAnt and devenv? 

Any help appreciated. 

With kind regards, 

--
Patrick Oor, Medical IT, Philips Medical Systems, Best, The Netherlands
e-mail: [EMAIL PROTECTED] 








[Nant-users] Suppressing output

2005-02-07 Thread Nau, Michael
Title: Suppressing  output






Is there a way to suppress the  output. I use a lot of  calls in my build process, which results in a bloated output file. I've set the verbose attribute to false, but still get a lot of output similar to:

[xmlpeek] Peeking at 'D:\perforce\mnau_main\Framework\Framework\Test\Framework.Test\Framework.Test.csproj' with XPath _expression_ 'VisualStudioProject/CSHARP/Build/References/Reference/@Name'.

[xmlpeek] Found '17' nodes with the XPath _expression_ 'VisualStudioProject/CSHARP/Build/References/Reference/@Name'.


[xmlpeek] No matching nodes found for XPath _expression_ 'VisualStudioProject/CSHARP/Build/References/[EMAIL PROTECTED]'Feature.Configuration']/@HintPath'.

Is there a way to supress this?


Thanks,

Mike.





[Nant-users] NAnt vs. Batch files

2005-02-07 Thread Merrill Cornish
Someone in our group is trying to decide whether it would be worthwhile for him 
to convert a number of build batch files into NAnt 0.85.  He' grumbling about 
how much NAnt he has to write to dulicate the work now done by the batch files. 
 He's right, of course.  Since NAnt is XML based, almost anthing else will be 
more concise than a NAnt script.

What really worries/annoys him is NAnt's handling of environment variables.

The compile step in the current batch files typically require a group of 
environment variables to be set for things like include paths, lib paths, and 
so on.  In the batch file, all you have to do is several SET statements, 
followed by one or more compile steps.  Each compile step then sees the 
original group of environment  variables you set up.  For some compile steps, 
the evironment variables need to be changed, but  that's just a few more SET 
statements in the batch file.  Deleting an environment variable need by one 
step, but not the next, is also just a SET (to nothing).

In NAnt, setting up all of those environment variables seems to be a real pain. 
 As I understand, one of .NET's security features is that its API does not 
allow environment or registry variable to be set (although there are ways 
around that limitation at the programming level).

As far as I can tell, he would have to 

* Set NAnt properties to the environment variable values from the current batch 
files.

* Use the  task for each compile step.

* For each , use its  nested element to specify the names of 
the environment variables the compile step needs, referencing the properties to 
get the values (rather than hard coding them into each call).

Among other things, this means that where one batch file SET statement would 
serve for any number of following compile steps, he would have to re-specify 
the whole set of enviroment variables for each .

So far, he's not really impressed with NAnt as a substitute for the current 
batch files.


My questions for any of you are:

*  Is there a better way in NAnt to getting the environment variables set for 
each ?

*  What arguments can I use to show that despite its verbosity, NAnt is the 
better way to go anyway?

Merrill




---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [Nant-users] NAnt vs. Batch files

2005-02-07 Thread Vagmi Mudumbai
NAnt is open source :-) . We can just add a task which uses the
SetEnvironmentVariable() API function. Interoping it in C# is not a
big problem. It would take only two lines. Anybody interested to add
it into the contrib project? :-)

IMHO, It is not unsafe code  and hence can be easily incorporated.

[DllImport("kernel32.dll")]
public static int SetEnvironmentVariable(string name, string value);


On Mon, 7 Feb 2005 20:52:25 -0600 (GMT-06:00), Merrill Cornish
<[EMAIL PROTECTED]> wrote:
> Someone in our group is trying to decide whether it would be worthwhile for 
> him to convert a number of build batch files into NAnt 0.85.  He' grumbling 
> about how much NAnt he has to write to dulicate the work now done by the 
> batch files.  He's right, of course.  Since NAnt is XML based, almost anthing 
> else will be more concise than a NAnt script.
> 
> What really worries/annoys him is NAnt's handling of environment variables.
> 
> The compile step in the current batch files typically require a group of 
> environment variables to be set for things like include paths, lib paths, and 
> so on.  In the batch file, all you have to do is several SET statements, 
> followed by one or more compile steps.  Each compile step then sees the 
> original group of environment  variables you set up.  For some compile steps, 
> the evironment variables need to be changed, but  that's just a few more SET 
> statements in the batch file.  Deleting an environment variable need by one 
> step, but not the next, is also just a SET (to nothing).
> 
> In NAnt, setting up all of those environment variables seems to be a real 
> pain.  As I understand, one of .NET's security features is that its API does 
> not allow environment or registry variable to be set (although there are ways 
> around that limitation at the programming level).
> 
> As far as I can tell, he would have to
> 
> * Set NAnt properties to the environment variable values from the current 
> batch files.
> 
> * Use the  task for each compile step.
> 
> * For each , use its  nested element to specify the names 
> of the environment variables the compile step needs, referencing the 
> properties to get the values (rather than hard coding them into each call).
> 
> Among other things, this means that where one batch file SET statement would 
> serve for any number of following compile steps, he would have to re-specify 
> the whole set of enviroment variables for each .
> 
> So far, he's not really impressed with NAnt as a substitute for the current 
> batch files.
> 
> My questions for any of you are:
> 
> *  Is there a better way in NAnt to getting the environment variables set for 
> each ?
> 
> *  What arguments can I use to show that despite its verbosity, NAnt is the 
> better way to go anyway?
> 
> Merrill
> 
> ---
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> ___
> Nant-users mailing list
> Nant-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users
> 


-- 
Vagmi
http://geekswithblogs.net/vagmi.mudumbai
http://installneo.blogspot.com


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


RE: [Nant-users] NAnt vs. Batch files

2005-02-07 Thread Eric Deslauriers
Merrill,

> *  Is there a better way in NAnt to getting the environment variables
set
> for each ?

Aha, finally I get to give back!

If he's using 0.85, please see the below, the sum of a discussion Ian
MacLean and I had a while ago on this list (BTW, this is still possible
in 0.84, just uglier)... Ian's the mastermind behind the streamlined
code below.








 
   



   
  

   




This way you don't have to call a specific target - just use the custom
 task. And its simple to set variables between calls to other
tasks.

The above generates the following output:
Target(s) specified: build

   [script] Scanning assembly "00f_4pst" for extensions.
 [echo] Setting new value
   [setenv] Setting env var X to test
 [echo] X = test

build:


This is probably somthing worth considering adding to NAnt. Of course we
would need to use platform #ifdefs as the above is windows specific.

Ian



One tip: if someone is using 

instead of
 

they'll need to refresh sys.env after changing (or prior to checking)
values:

 



---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
___
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [Nant-users] devenv and nant yield different build results

2005-02-07 Thread patrick . oor

Here are 2 reasons for me to build independently of VS: 

(1) I want to get rid of the overhead associated with VS, since the current builds take forever. Basic compiler calls are (said to be) more efficient. 
(2) I do not want to enforce our customers, who use our software for their development, to use VS too.

The different build results might be a reason too ;-)

--
Patrick Oor, Medical IT, Philips Medical Systems, Best, The Netherlands
e-mail: [EMAIL PROTECTED], phone: +31 40 27 62980











Brad Wilson <[EMAIL PROTECTED]>
Sent by: 
[EMAIL PROTECTED]
02/07/2005 03:53 PM
Please respond to dotnetguy

        
        To:        nant-users@lists.sourceforge.net
        cc:        (bcc: Patrick Oor/EHV/TASS/PHILIPS)
        Subject:        Re: [Nant-users] devenv and nant yield different build results
        Classification:        




That's a tough question. What DEVENV does internally is a bit of a
mystery, since Microsoft doesn't provide the source code for it.

You can always call DEVENV from within NAnt. There's nothing binding
you to using the  task or some XSL-T transform, unless your
goal is to remove Visual Studio from the build machine. If you're
comfortable having VS on the box, why not just call DEVENV?

- Brad

On Mon, 7 Feb 2005 15:27:58 +0100, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Is there someone who could explain (or suggest an explanation for) the
> different build results between NAnt and devenv?


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users




RE: [Nant-users] devenv and nant yield different build results

2005-02-07 Thread patrick . oor

Gert,

I did not get permission to send you the actual stuff with which the problem occurs. Therefore, I will try to reproduce the phenomenon with a dummy test project.  

For your information, I tried the  task too and it yielded the same result. My NAnt dlls are smaller than my devenv dlls.

Kind regards,
--
Patrick Oor, Medical IT, Philips Medical Systems, Best, The Netherlands
e-mail: [EMAIL PROTECTED], phone: +31 40 27 62980











"Gert Driesen" <[EMAIL PROTECTED]>
02/07/2005 04:01 PM

        
        To:        Patrick Oor/EHV/TASS/[EMAIL PROTECTED]
        cc:        
        Subject:        RE: [Nant-users] devenv and nant yield different build results
        Classification:        




Patrick,
 
Can you send me a small repro for that ?  Are you building both in the same build configuration ? Are you using the  task ?
 
Gert
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: maandag 7 februari 2005 15:58
To: nant-users@lists.sourceforge.net
Cc: Gert Driesen
Subject: RE: [Nant-users] devenv and nant yield different build results


Hi Gert, 

Thanks for the quick response. 

I am using C# projects. My version of NAnt is nant-0.85-rc1. 

An example of a difference: 
- with devenv I get a dll sized 20 k bytes 
- with NAnt the 'same' dll is sized only 8 k bytes 

I did not bother to do any further comparison on that. 

Kind regards, 

--
Patrick Oor, Medical IT, Philips Medical Systems, Best, The Netherlands
e-mail: [EMAIL PROTECTED], phone: +31 40 27 62980 










"Gert Driesen" <[EMAIL PROTECTED]> 
02/07/2005 03:45 PM 
        
        To:        Patrick Oor/EHV/TASS/[EMAIL PROTECTED]
 
        cc:         
        Subject:        RE: [Nant-users] devenv and nant yield different build results 
        Classification:         




Hi Patrick, 
  
What project types are you using (C#, VB, C++, ...) ? What difference are you noticing ?  What version of NAnt are you using ? 
  
Gert 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: maandag 7 februari 2005 15:28
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] devenv and nant yield different build results


Hi folks, 

My current development project uses a Perl script, which invokes devenv to build solutions in the correct order. I am investigating the use of NAnt as an alternative. However, I cannot generate the same dll with NAnt as with devenv :-( 

I have tried different ways to generate my build scripts (e.g., writing them myself, or generating them via SlingShot), but that did not matter for the result. 

Is there someone who could explain (or suggest an explanation for) the different build results between NAnt and devenv? 

Any help appreciated. 

With kind regards, 

--
Patrick Oor, Medical IT, Philips Medical Systems, Best, The Netherlands
e-mail: [EMAIL PROTECTED]