// protected methods... protected override ProjectElement LoadProject(ProjectInfo info, Hashtable projects, string configuration, string platform) { if (info.Kind == STR_SolutionFolder) { return(null); } if (info.Kind == ProjectTypeGuidConstants.WebSite) { return(LoadWebSiteProject(info, projects)); } string projectDir = Path.GetDirectoryName(info.FilePath); ProjectElement result = CreateProjectElement(info); MsBuildProjectLoader msBuildLoader = new MsBuildProjectLoader(info.FilePath); result.OptionStrict = msBuildLoader.OptionStrict; result.SetRootNamespace(msBuildLoader.RootNamespace); result.SetAssemblyName(msBuildLoader.AssemblyName); result.SetTargetFramework(msBuildLoader.TargetFramework); LoadProjectTypeGuids(result, msBuildLoader); LoadNotImportStdLibOption(result, msBuildLoader); LoadProjectDefines(result, msBuildLoader, configuration, platform); LoadReferences(result, msBuildLoader, projectDir); LoadProjectReferences(result, msBuildLoader, projects); LoadImportedNamespaces(result, msBuildLoader); LoadFiles(result, msBuildLoader, projectDir); return(result); }
protected virtual void LoadRootNamespace(ProjectElement project, XmlDocument lDoc, string lProjectDir, string lProjectLangTag) { string lSettingsQuery = String.Format(STR_SettingsQueryFormat, lProjectLangTag); XmlNodeList lSettings = lDoc.SelectNodes(lSettingsQuery); int lCount = lSettings.Count; if (lCount > 0) { System.Xml.XmlNode lSettingsNode = lSettings[0]; System.Xml.XmlNode lRootNamespace = lSettingsNode.Attributes.GetNamedItem(STR_RootNamespace); if (lRootNamespace != null) { project.SetRootNamespace(lRootNamespace.Value); } } }
protected virtual void LoadRootNamespace(ProjectElement project, XmlDocument lDoc, string lProjectDir, string lProjectLangTag) { string lSettingsQuery = String.Format(STR_SettingsQueryFormat, lProjectLangTag); XmlNodeList lSettings = lDoc.SelectNodes(lSettingsQuery); int lCount = lSettings.Count; if (lCount > 0) { System.Xml.XmlNode lSettingsNode = lSettings[0]; System.Xml.XmlNode lRootNamespace = lSettingsNode.Attributes.GetNamedItem(STR_RootNamespace); if (lRootNamespace != null) project.SetRootNamespace(lRootNamespace.Value); } }