public MSBuildConfiguration(MSBuildProject project, NAnt.MSBuild.BuildEngine.Project msproj, Configuration projectConfig) : base(project) { _name = projectConfig.Name; _platform = projectConfig.Platform; //explicit set. EvaluatedProperties will use those. //Its caller responsibility to set it back to original values, if needed msproj.GlobalProperties.SetProperty("Configuration", _name); if (!String.IsNullOrEmpty(_platform)) { msproj.GlobalProperties.SetProperty("Platform", _platform.Replace(" ", string.Empty)); } _relativeOutputDir = msproj.GetEvaluatedProperty("OutputPath"); if (!_relativeOutputDir.EndsWith(Path.DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture))) { _relativeOutputDir = _relativeOutputDir + Path.DirectorySeparatorChar; } _outputDir = new DirectoryInfo(FileUtils.CombinePaths( project.ProjectDirectory.FullName, _relativeOutputDir)); _objdir = new DirectoryInfo(msproj.GetEvaluatedProperty("IntermediateOutputPath")); _outputType = GetType(msproj.GetEvaluatedProperty("OutputType")); _asmname = msproj.GetEvaluatedProperty("AssemblyName"); }
public MSBuildConfiguration(MSBuildProject project, Microsoft.Build.BuildEngine.Project msproj, Configuration projectConfig) : base(project) { _name = projectConfig.Name; msproj.GlobalProperties.SetProperty("Configuration", _name); project.SetPlatform (projectConfig.Platform); _platform = msproj.GetEvaluatedProperty("Platform"); _relativeOutputDir = msproj.GetEvaluatedProperty("OutputPath"); if (!_relativeOutputDir.EndsWith(Path.DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture))) { _relativeOutputDir = _relativeOutputDir + Path.DirectorySeparatorChar; } _outputDir = new DirectoryInfo(FileUtils.CombinePaths( project.ProjectDirectory.FullName, _relativeOutputDir)); _objdir = new DirectoryInfo(msproj.GetEvaluatedProperty("IntermediateOutputPath")); _outputType = GetType(msproj.GetEvaluatedProperty("OutputType")); _asmname = msproj.GetEvaluatedProperty("AssemblyName"); }
public string LoadGuid(XmlElement xmlDefinition) { return(MSBuildProject.LoadGuid(xmlDefinition)); }