Udostępnij za pośrednictwem


SolutionConfiguration2.PlatformName Property

Definition

Gets the target platform CPU for configuration.

public:
 property System::String ^ PlatformName { System::String ^ get(); };
public:
 property Platform::String ^ PlatformName { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(10)]
public string PlatformName { [System.Runtime.InteropServices.DispId(10)] get; }
[<System.Runtime.InteropServices.DispId(10)>]
[<get: System.Runtime.InteropServices.DispId(10)>]
member this.PlatformName : string
Public ReadOnly Property PlatformName As String

Property Value

The name of the CPU platform.

Attributes

Examples

This example displays the active solution configuration item's CPU platform name for the first item. Open a project in the Visual Studio integrated development environment (IDE) before running this example.

Imports EnvDTE  
Imports EnvDTE80  
Sub SolutionConfigurationPlatformNameExample(ByVal dte As DTE2)  
    Try  
        Dim builder As SolutionBuild = _  
        _applicationObject.Solution.SolutionBuild  
        Dim config As SolutionConfiguration2  
        config = CType(builder.SolutionConfigurations.Item(1) _  
        , SolutionConfiguration2)  
        MsgBox("The platform name of the solution configuration is: " _  
        & config.PlatformName)  
    Catch ex As System.Exception  
        MsgBox(ex.ToString)  
    End Try  
End Sub  
using EnvDTE;  
using EnvDTE80;  
using System.Windows.Forms;  
public void SolutionConfigurationPlatformNameExample(DTE2 dte)  
{  
    try  
    {  
        SolutionBuild builder =  
 _applicationObject.Solution.SolutionBuild;  
        SolutionConfiguration2 config;  
        config =   
(SolutionConfiguration2)builder.SolutionConfigurations.Item(1);  
        MessageBox.Show("The platform name of the   
solution configuration is: " + config.PlatformName);  
    }  
    catch(SystemException ex)  
    {  
        MessageBox.Show(ex.ToString());  
    }  
}  

Applies to