Share via


Configuration.PlatformName 속성

이 할당에서 지원하는 플랫폼의 이름을 가져옵니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
ReadOnly Property PlatformName As String
string PlatformName { get; }
property String^ PlatformName {
    String^ get ();
}
abstract PlatformName : string with get
function get PlatformName () : String

속성 값

형식: String
이 할당에서 지원하는 플랫폼 이름을 나타내는 문자열입니다.

설명

프로젝트에서 플랫폼을 지원하지 않는 경우 PlatformName은 빈 문자열을 반환합니다.

예제

public void CodeExample(DTE2 dte, AddIn addin)
{   // Make sure you have a solution loaded into Visual Studio
    // before running the following example.
    try
    {
        Project prj;
        Configuration config; 
        OutputGroups outPGs;
        Properties props;
        if (dte.Solution.Projects.Count > 0)
        {
            prj = dte.Solution.Projects.Item(1);
            config = prj.ConfigurationManager.ActiveConfiguration;
            // Return a collection of OutputGroup objects that contain
            // the names of files that are outputs for the project.
            outPGs = config.OutputGroups;
            MessageBox.Show(outPGs.Count.ToString());
            // Returns the project for the config.
            MessageBox.Show(((Project)config.Owner).Name);
            // Returning the platform name for the Configuration.
            MessageBox.Show(config.PlatformName);
            // Returning all properties for Configuration object.
            props = config.Properties;
            string p = "";
            foreach (Property prop in props)
            {
                p = p + prop.Name + "\n";
            }
            MessageBox.Show(p);
        }
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

.NET Framework 보안

참고 항목

참조

Configuration 인터페이스

EnvDTE 네임스페이스

기타 리소스

방법: 자동화 개체 모델 코드의 예제 컴파일 및 실행