Here's a working example we use. Instead of using the msbuild task, we just use exec to call up msbuild. <target name="build-lcdpanel" description="Build the LCD Panel solution"> <mkdir dir="${build}" /> <exec program="${msbuild}"> <arg value="${lcdpanel}/LcdPanel.sln" /> <arg value="/fileLogger" /> <arg value="/fileLoggerParameters:Verbosity=normal;LogFile=${build}/LCDPanelB uild.log" /> <arg value="/p:Configuration=Release" /> </exec> </target>
The arg value elements are to pass the various parameters to the msbuild exe. I'd start by getting your project working with msbuild.exe itself - then introduce NANT. You could have simple reference or path type issues. ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Mitchell Sent: Tuesday, April 29, 2008 2:11 PM To: nant-users@lists.sourceforge.net Subject: [NAnt-users] MS Visual Studio 2005 Solution files and <msbuild>command I hope someone here can help me. I am new to NANT. So please forgive me if I am overlooking something. My problems is using VS 2005 solution files and NANT. I understand from the documentation that 2005 Solution files can not be used when using the NANT <solution> command. So it was suggested on one of the posts in archives for this list that <msbuild> be used. But I have problems with that also. Here is the lines from my .build file that should build the solution file. It launches the solution file, and does the build but I get all kinds of errors when building through this, whereas if I launch the .sln file myself and do the build that way it works fine with now errors. One of the things that I noticed is that I need to set the buildtype = release. How would I do that with this command? I can't seem to find any examples on using <msbuild> command. <target name="buildBuilder"> <msbuild project="${local.chekout.path}\lightnet\lights32\lights32.sln"/> </target> This should be a lot easier than I am making it out to be, and I am sure I am just missing something, but I can't seem to figure it out. Any sort of help would just be greatly appreciated. Thanks, Scott Mitchell -- Scott Mitchell Engineering Colorado vNet direct 970 203 3756 main 970 203 3700 fax 970 203 3701 email [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> web www.coloradovnet.com <http://www.coloradovnet.com> 255 East Sixth Street Loveland, Colorado 80537 ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users