Getting aspnet_compiler.exe to suppress warnings is really a question for a MS .NET support forum. However, I've looked into this recently, and you're basically out of luck - you can't suppress the warnings. You could perhaps consider one of the following options:
1) Fix the warnings. Sure, they're not hard errors, but some warnings are important, so it's best not to allow your code-base to fill up with unaddressed warnings. 2) Find out about the exit code of aspnet_compiler.exe and see if it's possible to distinguish between warnings and errors. I wouldn't hold my breath, though. I'm fairly sure I've read that an exit-code of 1 occurs in both scenarios. 3) Consider parsing the output of aspnet_compiler.exe. Errors are reported in preference to warnings, so if you can reliably detect a warning reported in the output, you can [probably] assume there are no errors. Good luck! Chris -----Original Message----- From: gmoney [mailto:g.lab...@autodata.ltd.uk] Sent: 08 October 2009 15:16 To: nant-users@lists.sourceforge.net Subject: [NAnt-users] aspnet_compiler.exe ignore warning messages Hi I use the "aspnet_compiler.exe" in my nant script to compile a asp.net website. There are warnings messages that are being outputted. I only am interested in errors, therefore how can i only see errors and not warnings? My code is as follows: <exec program="${dotnet}/aspnet_compiler.exe" commandline="-f -u -p ${BuildDirIE} -v / ${outputFolderIE}" verbose="true" failonerror="false"/> -- View this message in context: http://www.nabble.com/aspnet_compiler.exe-ignore-warning-messages-tp2580 3015p25803015.html Sent from the NAnt - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------ ------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users