You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Wojciech Zalecki <ma...@poczta.wp.pl> on 2006/07/27 22:14:45 UTC

ANT problem

Hi all

I'm using single ANT script to compile many .net projects.
One of the projects in my build requires compilation under framework
2.0 (the rest is 1.1).
I want to change my script so that in particular moment , before
calling csc task to compile 2.0 project , env var PATH is set by
running proper vsvars32.bat. After compilation , I want to change env
var PATH (running another vsvars32.bat) so it points back to framework
1.1 directories.


NOTE that vsvars32.bat is a file which sets PATH variable but only for
console session which 'called' the file


 I cannot use NANT. I have to achieve this with ANT, and what is more
important ,all projects must compile with calling single ANT script.  I
tried running exec task with batch file changing PATH variable but
changes are not stored , and csc is using 'old' paths (pointing .net
1.1)

In other words , the question is , how to tell ANT to get another value 
for PATH env var (in 'runtime')


regards
Wojtek



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ANT problem

Posted by Tommy Nordgren <to...@chello.se>.
Jul 27, 2006 kl. 10:14 PM skrev Wojciech Zalecki:

> Hi all
>
> I'm using single ANT script to compile many .net projects.
> One of the projects in my build requires compilation under framework
> 2.0 (the rest is 1.1).
> I want to change my script so that in particular moment , before
> calling csc task to compile 2.0 project , env var PATH is set by
> running proper vsvars32.bat. After compilation , I want to change env
> var PATH (running another vsvars32.bat) so it points back to framework
> 1.1 directories.
>
>
> NOTE that vsvars32.bat is a file which sets PATH variable but only for
> console session which 'called' the file
>
>
> I cannot use NANT. I have to achieve this with ANT, and what is more
> important ,all projects must compile with calling single ANT  
> script.  I
> tried running exec task with batch file changing PATH variable but
> changes are not stored , and csc is using 'old' paths (pointing .net
> 1.1)
>
> In other words , the question is , how to tell ANT to get another  
> value for PATH env var (in 'runtime')
>
>
> regards
> Wojtek
>
>
>
	You can Exec ant, passing an auxillary build file, and setting the  
environment variable to a custom value.

-------------------------------------
This sig is dedicated to the advancement of Nuclear Power
Tommy Nordgren
tommy.nordgren@chello.se




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org