Bugs item #1579653, was opened at 2006-10-18 12:58 Message generated for change (Comment added) made by s_tracey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1579653&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.85 Status: Open Resolution: None Priority: 5 Submitted By: s_tracey (s_tracey) Assigned to: Nobody/Anonymous (nobody) Summary: solution task problem with VB.NET compilation constants Initial Comment: If you have a .NET solution consisting of a VB.NET project that has conditional compilation constants containing string literals defined e.g .VBProj contains line: DefineConstants = 'NAME="Value"' (this is how VS represents ccc's in .VBProj file) Then the <solution> task fails to properly present these constants to vbc, hence breaking build. If you use the <vbc> task, then this only works properly if you prepend quotes with a "\". e.g This does not work: <vbc .... define="NAME="Value;"" ... But this does: <vbc .... define="NAME=\"Value\"" ... This is because of a known problem with the .NET vbc compiler (.NET 10, 1.1 and 2.0 I believe)(which <vbc> task maps to) - see MS kb 818217 I suspect problem is that <solution> task does not prepend the "\" when formulating the define attribute values. Should be a quick fix for someone which would certainly add a lot of value to me. Looking to automate build/test of several large VB.NET solutions which rely heavily on conditional compilation constants. There is also an argument for adding the fix to <vbc> task as well. Until then, am stuck with using XSLT to transform .vbproj to .build script, which is not ideal. If you need an example, let me know. ---------------------------------------------------------------------- >Comment By: s_tracey (s_tracey) Date: 2006-10-18 13:16 Message: Logged In: YES user_id=1623879 Update. I have just found a work-around, which may be of interest to anyone else who's hit the same problem. You can use NANT <replace> task (or until it exists, a call out to a search/replace utility) to prepend the quotes in the right place in the .vbproj i.e DefineConstants = 'NAME="Value"' becomes DefineConstants = 'NAME=\"Value\"' Then <solution> task will run. Need to remember to remove the "\"'s afterwards though, as Visual Studio builds (2002 at least) does not like them. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1579653&group_id=31650 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers