Hi, I have problems with buildin solution, when I trying to build it, I'm getting following error message:
[solution] Starting solution build. BUILD FAILED Error checking whether 'C:\MPI2Build\src\MPI\MAG\HostingEnvironment\http://localhost/MPISeviceFacad e/MPISeviceFacade.csproj' is an enterprise template project. The given path's format is not supported. Total time: 1.5 seconds. I looked into sources and I found that that is problem with RecursiveLoadTemplateProject function in Solution.cs. This function recursively loads all subprojects. The problem is that it doesn't use WebMap to translate web Urls into local paths. I have some subprojects located on the web, so I think that there must be WebMap transformation implemented in the RecursiveLoadTemplateProject function. There is my sample code doing it. I added webMaps parameter into RecursiveLoadTemplateProject function, to give it access to WebMaps. The call of function looks like: RecursiveLoadTemplateProject(fullPath,_webMaps); I'm not a programmer, so I don't know if it is best solution - but it works :) My code: public void RecursiveLoadTemplateProject(string fileName, WebMapCollection webMaps) { XmlDocument doc = new XmlDocument(); doc.Load(fileName); WebMapCollection _webMaps = webMaps; foreach (XmlNode node in doc.SelectNodes("//Reference")) { XmlNode projectGuidNode = node.SelectSingleNode("GUIDPROJECTID"); XmlNode fileNode = node.SelectSingleNode("FILE"); if (fileNode == null) { Log(Level.Warning, LogPrefix + "Reference with missing <FILE> node. Skipping."); continue; } // check if we're dealing with project or assembly reference if (projectGuidNode != null) { string subProjectFilename = node.SelectSingleNode("FILE").InnerText; string fullPath; // translate URLs to physical paths if using a webmap string map = _webMaps.FindBestMatch(subProjectFilename); if (map != null) { Log(Level.Debug, LogPrefix + "Found webmap match: " + map); subProjectFilename = map; } try { Uri uri = new Uri(subProjectFilename); if (uri.Scheme == Uri.UriSchemeFile) { fullPath = Path.Combine(Path.GetDirectoryName(fileName), subProjectFilename); } else { fullPath = subProjectFilename; } } catch (UriFormatException) { fullPath = Path.Combine(Path.GetDirectoryName(fileName), subProjectFilename); } if (Project.IsEnterpriseTemplateProject(fullPath)) { RecursiveLoadTemplateProject(fullPath,_webMaps); } else { _htProjectFiles[projectGuidNode.InnerText] = fullPath; } } else { Log(Level.Verbose, LogPrefix + "Skipping file reference '{0}'.", fileNode.InnerText); } } } -- ==================== Pawel Madziar Configuration Manager Altkom Akademia SA Phone: +48 22 860-70-42 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
