Microsoft.VisualStudio.Project.ConfigProvider.AddCfgsOfPlatformName C# (CSharp) Method

AddCfgsOfPlatformName() public method

Copies an existing platform name or creates a new one.
public AddCfgsOfPlatformName ( string platformName, string clonePlatformName ) : int
platformName string The name of the new platform.
clonePlatformName string The name of the platform to copy, or a null reference, indicating that AddCfgsOfPlatformName should create a new platform.
return int
        public virtual int AddCfgsOfPlatformName(string platformName, string clonePlatformName)
        {
            // We need to QE/QS the project file
            if (!this.ProjectManager.QueryEditProjectFile(false))
            {
                throw Marshal.GetExceptionForHR(VSConstants.OLE_E_PROMPTSAVECANCELLED);
            }

            foreach (MSBuild.Project project in GetBuildProjects(true))
            {
                int hr = AddPlatform(project, platformName, clonePlatformName);
                if (ErrorHandler.Failed(hr))
                    return hr;
            }

            NotifyOnPlatformNameAdded(platformName);
            return VSConstants.S_OK;
        }