コード例 #1
0
ファイル: MSBuildConfiguration.cs プロジェクト: smaclell/NAnt
        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");
        }
コード例 #2
0
        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");
        }