Microsoft.VisualStudio.Project.ProjectNode.InitializeProjectProperties C# (CSharp) Method

InitializeProjectProperties() protected method

Initialize common project properties with default value if they are empty
The following common project properties are defaulted to projectName (if empty): AssemblyName, Name and RootNamespace. If the project filename is not set then no properties are set
protected InitializeProjectProperties ( ) : void
return void
        protected virtual void InitializeProjectProperties()
        {
            // Get projectName from project filename. Return if not set
            string projectName = Path.GetFileNameWithoutExtension(this.filename);
            if (String.IsNullOrEmpty(projectName))
            {
                return;
            }

            if (String.IsNullOrEmpty(GetProjectProperty(ProjectFileConstants.AssemblyName)))
            {
                SetProjectProperty(ProjectFileConstants.AssemblyName, projectName);
            }
            if (String.IsNullOrEmpty(GetProjectProperty(ProjectFileConstants.Name)))
            {
                SetProjectProperty(ProjectFileConstants.Name, projectName);
            }
            if (String.IsNullOrEmpty(GetProjectProperty(ProjectFileConstants.RootNamespace)))
            {
                SetProjectProperty(ProjectFileConstants.RootNamespace, projectName);
            }
        }
ProjectNode