I think you will find this fixed in the latest nightly builds. (I had the same problem a few weeks back...)
Ray -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, April 11, 2005 6:47 AM To: nant-users@lists.sourceforge.net 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. Thank you, --Seth ------------------------------------------------------- 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=ick _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------- 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