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"); }