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

GetMsBuildProperty() private method

private GetMsBuildProperty ( string propertyName, bool resetCache ) : Microsoft.Build.Execution.ProjectPropertyInstance
propertyName string
resetCache bool
return Microsoft.Build.Execution.ProjectPropertyInstance
        private MSBuildExecution.ProjectPropertyInstance GetMsBuildProperty(string propertyName, bool resetCache)
        {
            if (resetCache || this.currentConfig == null)
            {
                // Get properties from project file and cache it
                this.SetCurrentConfiguration();
                this.currentConfig = this.buildProject.CreateProjectInstance();
            }

            if (this.currentConfig == null)
                throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, SR.GetString(SR.FailedToRetrieveProperties, CultureInfo.CurrentUICulture), propertyName));

            // return property asked for
            return this.currentConfig.GetProperty(propertyName);
        }
ProjectNode