> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> [EMAIL PROTECTED]
> Sent: maandag 11 april 2005 15:47
> To: [email protected]
> Subject: [Nant-users] Post-Build event failing using 
> $(OutDir) macro with C++ project and Solution task
> 
> Hello,
>       I have been using NAnt with various projects for the past year
> or so and have now run into a problem involving C++ projects with
> post-build events not working properly with the solution task.  
> 
> The setup: A solution with 59 C# project, one J# project and one C++
> project.  Compiles and Post-Build events work fine in the 
> IDE, however,
> with NAnt 0.85 RC2 we get problems...
> 
> The problem:  The C++ (and only the C++) project's post-build 
> event does
> not work correctly with the $(OutDir) macro.  I have the following
> statement: copy $(ProjectDir)$(OutDir)\$(TargetFileName)
> $(SolutionDir)bin\$(OutDir) /y 
> and when run within the IDE, it works fine.  However, when this
> statement is run via NAnt, it is executed as the following:
> copy C:\source\project\C:\source\project\Debug\project.dll
> C:\source\bin\C:\source\project\Debug /y
> 
> If I change $(OutDir) to $(IntDir), everything just works.
> 
> If I run this from the IDE, the output is as follows:
> copy C:\source\project\Debug\project.dll C:\source\bin\Debug\ /y
> 
> This, of course, also works.  What it appears to me is that for some
> reason, $(OutDir) is having the projects working directory 
> pre-pended to
> it when used by NAnt (the IDE shows the OutDir macro as "Debug", while
> NAnt appears to be using OutDir as "C:\source\project\Debug").
> 
> Also note that all of the C# projects are using nearly identical
> post-build scripts (using the OutDir macro) and they work 
> fine, this is
> only an issue for this one C++ project.
> 
> Any ideas?  For now I can work around this by using the 
> $(IntDir) macro,
> however, if one day the directory for the intermediate files 
> changes for
> any reason, the script will break.

Are you explicitly setting an output directory on the <solution> task using
the "outputdir" attribute ? 

If not, then please provide a small repro for this issue.

Thanks !

Gert



-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to