コード例 #1
0
        private Guid?GetProjectTypeGuidFromProjectTypeEnum(SolutionProjectType solutionProjectType)
        {
            if (solutionProjectType == SolutionProjectType.ManagedCsProject)
            {
                return(csProjectGuid);
            }

            if (solutionProjectType == SolutionProjectType.ManagedVbProject)
            {
                return(vbProjectGuid);
            }

            if (solutionProjectType == SolutionProjectType.ManagedVjProject)
            {
                return(vjProjectGuid);
            }

            if (solutionProjectType == SolutionProjectType.SolutionFolder)
            {
                return(solutionFolderGuid);
            }

            if (solutionProjectType == SolutionProjectType.VCProject)
            {
                return(vcProjectGuid);
            }

            if (solutionProjectType == SolutionProjectType.WebProject)
            {
                return(webProjectGuid);
            }

            return(null);
        }
コード例 #2
0
 internal ProjectInSolution(SolutionParser solution)
 {
     this.projectType             = SolutionProjectType.Unknown;
     this.projectName             = (string)null;
     this.relativePath            = (string)null;
     this.projectGuid             = (string)null;
     this.dependencies            = new ArrayList();
     this.projectReferences       = new ArrayList();
     this.parentProjectGuid       = (string)null;
     this.uniqueProjectName       = (string)null;
     this.parentSolution          = solution;
     this.dependencyLevel         = -1;
     this.isStaticLibrary         = false;
     this.childReferencesGathered = false;
     this.targetFrameworkMoniker  = ".NETFramework,Version=v3.5";
     this.aspNetConfigurations    = new Hashtable((IEqualityComparer)StringComparer.OrdinalIgnoreCase);
     this.projectConfigurations   = new Dictionary <string, ProjectConfigurationInSolution>((IEqualityComparer <string>)StringComparer.OrdinalIgnoreCase);
 }
コード例 #3
0
ファイル: ProjectInSolution.cs プロジェクト: xen2/msbuild
        internal ProjectInSolution(SolutionParser solution)
        {
            projectType             = SolutionProjectType.Unknown;
            projectName             = null;
            relativePath            = null;
            projectGuid             = null;
            dependencies            = new ArrayList();
            projectReferences       = new ArrayList();
            parentProjectGuid       = null;
            uniqueProjectName       = null;
            parentSolution          = solution;
            dependencyLevel         = ProjectInSolution.DependencyLevelUnknown;
            isStaticLibrary         = false;
            childReferencesGathered = false;

            // This hashtable stores a AspNetCompilerParameters struct for each configuration name supported.
            aspNetConfigurations = new Hashtable(StringComparer.OrdinalIgnoreCase);

            projectConfigurations = new Dictionary <string, ProjectConfigurationInSolution>(StringComparer.OrdinalIgnoreCase);
        }
コード例 #4
0
        internal ProjectInSolution(SolutionFile solution)
        {
            _projectType       = SolutionProjectType.Unknown;
            _projectName       = null;
            _relativePath      = null;
            _projectGuid       = null;
            _dependencies      = new List <string>();
            _projectReferences = new ArrayList();
            _parentProjectGuid = null;
            _uniqueProjectName = null;
            _parentSolution    = solution;

            // default to .NET Framework 3.5 if this is an old solution that doesn't explicitly say.
            _targetFrameworkMoniker = ".NETFramework,Version=v3.5";

            // This hashtable stores a AspNetCompilerParameters struct for each configuration name supported.
            _aspNetConfigurations = new Hashtable(StringComparer.OrdinalIgnoreCase);

            _projectConfigurations = new Dictionary <string, ProjectConfigurationInSolution>(StringComparer.OrdinalIgnoreCase);
        }
コード例 #5
0
ファイル: ProjectInSolution.cs プロジェクト: cdmihai/msbuild
        internal ProjectInSolution(SolutionFile solution)
        {
            _projectType = SolutionProjectType.Unknown;
            _projectName = null;
            _relativePath = null;
            _projectGuid = null;
            _dependencies = new List<string>();
            _projectReferences = new ArrayList();
            _parentProjectGuid = null;
            _uniqueProjectName = null;
            _parentSolution = solution;

            // default to .NET Framework 3.5 if this is an old solution that doesn't explicitly say.
            _targetFrameworkMoniker = ".NETFramework,Version=v3.5";

            // This hashtable stores a AspNetCompilerParameters struct for each configuration name supported.
            _aspNetConfigurations = new Hashtable(StringComparer.OrdinalIgnoreCase);

            _projectConfigurations = new Dictionary<string, ProjectConfigurationInSolution>(StringComparer.OrdinalIgnoreCase);
        }
コード例 #6
0
 internal ProjectInSolution(SolutionParser solution)
 {
   this.projectType = SolutionProjectType.Unknown;
   this.projectName = (string) null;
   this.relativePath = (string) null;
   this.projectGuid = (string) null;
   this.dependencies = new ArrayList();
   this.projectReferences = new ArrayList();
   this.parentProjectGuid = (string) null;
   this.uniqueProjectName = (string) null;
   this.parentSolution = solution;
   this.dependencyLevel = -1;
   this.isStaticLibrary = false;
   this.childReferencesGathered = false;
   this.targetFrameworkMoniker = ".NETFramework,Version=v3.5";
   this.aspNetConfigurations = new Hashtable((IEqualityComparer) StringComparer.OrdinalIgnoreCase);
   this.projectConfigurations = new Dictionary<string, ProjectConfigurationInSolution>((IEqualityComparer<string>) StringComparer.OrdinalIgnoreCase);
 }
コード例 #7
0
        /// <summary>
        /// Initializes a new instance of <see cref="SolutionProject"/>.
        /// </summary>
        /// <param name="projectGuid">The guid of the project.</param>
        /// <param name="csProjFilePath">The project file path.</param>
        /// <param name="solutionFilePath">The solution file path.</param>
        /// <param name="projectType">The project type.</param>
        public SolutionProject(Guid projectGuid, string csProjFilePath, string solutionFilePath, SolutionProjectType projectType)
        {
            this.ProjectGuid       = projectGuid;
            this.ProjectName       = Path.GetFileName(csProjFilePath);
            this.ProjectType       = projectType;
            this.SolutionFilePath  = solutionFilePath;
            this.SolutionDirectory = Path.GetDirectoryName(solutionFilePath);
            this.RelativePath      = Path.GetRelativePath(this.SolutionDirectory, csProjFilePath);
            this.AbsolutePath      = Path.Combine(this.SolutionDirectory, this.RelativePath);

            Guid?projectTypeGuid = GetProjectTypeGuidFromProjectTypeEnum(projectType);

            if (!projectTypeGuid.HasValue)
            {
                throw new Exception(string.Format("Cannot find project type guid for project type {0}", projectType));
            }
            this.ProjectTypeGuid = projectTypeGuid.Value;
        }
コード例 #8
0
ファイル: ProjectInSolution.cs プロジェクト: nikson/msbuild
        internal ProjectInSolution(SolutionParser solution)
        {
            projectType = SolutionProjectType.Unknown;
            projectName = null;
            relativePath = null;
            projectGuid = null;
            dependencies = new ArrayList();
            projectReferences = new ArrayList();
            parentProjectGuid = null;
            uniqueProjectName = null;
            parentSolution = solution;
            dependencyLevel = ProjectInSolution.DependencyLevelUnknown;
            isStaticLibrary = false;
            childReferencesGathered = false;

            // This hashtable stores a AspNetCompilerParameters struct for each configuration name supported.
            aspNetConfigurations = new Hashtable(StringComparer.OrdinalIgnoreCase);

            projectConfigurations = new Dictionary<string, ProjectConfigurationInSolution>(StringComparer.OrdinalIgnoreCase);
        }