Bugs item #1924923, was opened at 2008-03-25 18:25 Message generated for change (Comment added) made by bevan-arps You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1924923&group_id=31650
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Tasks Group: 0.86 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Vinod Shenoy (vinodshenoy) Assigned to: Nobody/Anonymous (nobody) Summary: 2 successive builds using NAnt causes failure Initial Comment: Hi, In our project we require to build to solutions. The framework used is .NET 2.0 The solution task does not work, hence I am forced to use the exec task to build it. Along with the build I am copying the files and zipping them for release as well (using other tasks and depends attribute). Since I require to do this in 2 solutions, I have 2 build files in the respective solutions and only one task is called which internally calls the other one. The first build is done properly with the copy and zip but the second one throws an error stating the return code from devenv was 1. I tried separating the tasks and executing them through a batch file. but I still get the same error. But when I run the second task individually it works fine. Currently, as a work around I am calling the second task twice in the batch file. This causes it to fail once and then execute the next time. Please help, as this does not seem to be a viable longterm solution. ---------------------------------------------------------------------- Comment By: Bevan (bevan-arps) Date: 2008-03-31 14:37 Message: Logged In: YES user_id=1391661 Originator: NO Not sure what's causing your exact problem, but your comment "an error stating the return code from devenv was 1." suggests a possible workaround. It seems that you doing the builds by invoking Visual Studio itself (devenv) from the commandline. Is this correct? If so, you're likely to have better success by switching to msbuild - this is how I build all my VS2005/VS2008 projects and everything works really well. Here's how I do it: At the top of my build file: <property name="msbuild.dir" value="C:\WINDOWS\Microsoft.NET\Framework\v3.5"/> <fail message="MSBuild not fould in ${msbuild.dir}" unless="${file::exists( path::combine(msbuild.dir, 'MSBuild.exe'))}"/> Then, the task itself: <target name="compile"> <exec program="${msbuild.dir}\MSBuild.exe"> <arg file="Niche.Net.sln"/> <arg value="/t:rebuild"/> <arg value="/verbosity:quiet"/> </exec> </target> Hope this helps, Bevan. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1924923&group_id=31650 ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers