Bugs item #1534864, was opened at 2006-08-05 02:48 Message generated for change (Comment added) made by asherfoa You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1534864&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: asherf (asherfoa) Assigned to: Gert Driesen (drieseng) Summary: Solution task doesn’t handle project dependencies properly Initial Comment: Solution task doesn’t handle project dependencies properly when working with enterprise templates (etp). When a solution files points to a ETP project and the project section contains dependencies they are not handles properly by the solution task. I am working with the latest nightly build (2006-07-23) The bug is in NAnt.VSNet\Everett\Solution.cs: // set-up project dependencies Regex reDependencies = new Regex(@"^\s+(?<guid>\{[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}\})\s+=\s+(?<dep>\{[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}\})", RegexOptions.Multiline); MatchCollection dependencyMatches = reDependencies.Matches(projectMatch.Value); foreach (Match dependencyMatch in dependencyMatches) { string dependency = dependencyMatch.Groups["dep"].Value; if (!explicitProjectDependencies.ContainsKey(guid)) { explicitProjectDependencies[guid] = CollectionsUtil.CreateCaseInsensitiveHashtable(); } ((Hashtable) explicitProjectDependencies[guid])[dependency] = null; } As you can see the code doesn’t actually extracts the GUID from the string (using regex). The guid variable in the loop contains the guid from the outer scope, which is the guid of the ETP project. Fixed code: Regex reDependencies = new Regex(@"^\s+(?<guid>\{[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}\})\s+=\s+(?<dep>\{[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}\})", RegexOptions.Multiline); MatchCollection dependencyMatches = reDependencies.Matches(projectMatch.Value); foreach (Match dependencyMatch in dependencyMatches) { string dependency = dependencyMatch.Groups["dep"].Value; string projGuide = dependencyMatch.Groups["guid"].Value; if (!explicitProjectDependencies.ContainsKey(projGuide)) { explicitProjectDependencies[projGuide] = CollectionsUtil.CreateCaseInsensitiveHashtable(); } ((Hashtable) explicitProjectDependencies[projGuide])[dependency] = null; } That’s all. ---------------------------------------------------------------------- >Comment By: asherf (asherfoa) Date: 2006-08-05 14:20 Message: Logged In: YES user_id=1569013 another thing I encountered is something that looks like a bug in vs.net 2003. it doesn't handle project depenencies for projects inside ETPs. http://dotnet247.com/247reference/msgs/42/213100.aspx I am working on uploading/contibuting a patch. ---------------------------------------------------------------------- Comment By: Gert Driesen (drieseng) Date: 2006-08-05 10:22 Message: Logged In: YES user_id=707851 Can you attach a small repro to this report ? ---------------------------------------------------------------------- Comment By: asherf (asherfoa) Date: 2006-08-05 07:59 Message: Logged In: YES user_id=1569013 I made a small mistake in my suggested fix. it should use the guid from the regex result only if the current project is an ETP: string projGuid = guid; if (isEnterpriseTemplate) //this question is asked a few lines //earlier, the result can be saved for this question { projGuid = dependencyMatch.Groups["guid"].Value;} ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1534864&group_id=31650 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers