GetProjectFileFromGuid() public method

Gets the project file of the project with the given unique identifier.
No project with unique identifier could be located.
public GetProjectFileFromGuid ( string projectGuid ) : string
projectGuid string The unique identifier of the project for which the project file should be retrieves.
return string
コード例 #1
1
        public ManagedProjectReference(XmlElement xmlDefinition, ReferencesResolver referencesResolver, ProjectBase parent, SolutionBase solution, TempFileCollection tfc, GacCache gacCache, DirectoryInfo outputDir)
            : base(referencesResolver, parent)
        {
            if (xmlDefinition == null) {
                throw new ArgumentNullException("xmlDefinition");
            }
            if (solution == null) {
                throw new ArgumentNullException("solution");
            }
            if (tfc == null) {
                throw new ArgumentNullException("tfc");
            }
            if (gacCache == null) {
                throw new ArgumentNullException("gacCache");
            }

            XmlAttribute privateAttribute = xmlDefinition.Attributes["Private"];
            if (privateAttribute != null) {
                _isPrivateSpecified = true;
                _isPrivate = bool.Parse(privateAttribute.Value);
            }

            // determine path of project file
            string projectFile = solution.GetProjectFileFromGuid(
                xmlDefinition.GetAttribute("Project"));

            // load referenced project
            _project = LoadProject(solution, tfc, gacCache, outputDir, projectFile);
        }
コード例 #2
0
        public VcProjectReference(XmlElement xmlDefinition, ReferencesResolver referencesResolver, ProjectBase parent, SolutionBase solution, TempFileCollection tfc, GacCache gacCache, DirectoryInfo outputDir) : base(referencesResolver, parent)
        {
            if (xmlDefinition == null)
            {
                throw new ArgumentNullException("xmlDefinition");
            }
            if (solution == null)
            {
                throw new ArgumentNullException("solution");
            }
            if (tfc == null)
            {
                throw new ArgumentNullException("tfc");
            }
            if (gacCache == null)
            {
                throw new ArgumentNullException("gacCache");
            }

            XmlAttribute privateAttribute = xmlDefinition.Attributes["CopyLocal"];

            if (privateAttribute != null)
            {
                _isPrivateSpecified = true;
                _isPrivate          = bool.Parse(privateAttribute.Value);
            }

            // determine path of project file
            string projectFile = solution.GetProjectFileFromGuid(
                xmlDefinition.GetAttribute("ReferencedProjectIdentifier"));

            // load referenced project
            _project = LoadProject(solution, tfc, gacCache, outputDir, projectFile);
        }
コード例 #3
0
 public MSBuildProjectReference(
     ReferencesResolver referencesResolver, ProjectBase parent,
     SolutionBase solution, TempFileCollection tfc,
     GacCache gacCache, DirectoryInfo outputDir,
     string pguid, string pname, string rpath, string priv)
     
     : base(referencesResolver, parent) {
     _helper = new MSBuildReferenceHelper(priv, true);
     string projectFile = solution.GetProjectFileFromGuid(pguid);
     _project = LoadProject(solution, tfc, gacCache, outputDir, projectFile);
 }