Example #1
0
        /// <summary>
        /// Retrives the list of project guids from the project file.
        /// If you don't want your project to be flavorable, override
        /// to only return your project factory Guid:
        ///      return this.GetType().GUID.ToString("B");
        /// </summary>
        /// <param name="file">Project file to look into to find the Guid list</param>
        /// <returns>List of semi-colon separated GUIDs</returns>
        protected override string ProjectTypeGuids(string file)
        {
            // Load the project so we can extract the list of GUIDs
            _buildProject = Utilities.ReinitializeMsBuildProject(_buildEngine, file, _buildProject);

            // Retrieve the list of GUIDs, if it is not specify, make it our GUID
            string guids = _buildProject.GetPropertyValue(ProjectFileConstants.ProjectTypeGuids);

            if (string.IsNullOrEmpty(guids))
            {
                guids = GetType().GUID.ToString("B");
            }

            return(guids);
        }