SolutionContext.PlatformName Property
Gets the name of the platform supported by this assignment.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
ReadOnly Property PlatformName As String
string PlatformName { get; }
property String^ PlatformName {
String^ get ();
}
abstract PlatformName : string with get
function get PlatformName () : String
Property Value
Type: System.String
A string representing the platform name supported by this assignment.
Remarks
If the project supports no platforms, then PlatformName returns an empty string.
Examples
Sub PlatformNameExample(ByVal dte As DTE2)
' Before running this example, open a project.
' Display the solution contexts of the Debug configuration.
Dim config As SolutionConfiguration = _
dte.Solution.SolutionBuild.SolutionConfigurations.Item("Debug")
Dim context As SolutionContext
Dim msg As String
msg &= config.Name & " Configuration Project Platforms:" & _
vbCrLf & vbCrLf
For Each context In config.SolutionContexts
msg &= " " & context.ProjectName & " = " & _
context.PlatformName & vbCrLf
Next
MsgBox(msg)
End Sub
public void PlatformNameExample(DTE2 dte)
{
// Before running this example, open a project.
// Display the solution contexts of the Debug configuration.
SolutionConfiguration config =
dte.Solution.SolutionBuild.SolutionConfigurations.Item(
"Debug");
string msg = "";
msg += config.Name + " Configuration Project Platforms:\n\n";
foreach (SolutionContext context in config.SolutionContexts)
msg += " " + context.ProjectName + " = " +
context.PlatformName + "\n";
MessageBox.Show(msg);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Other Resources
How to: Compile and Run the Automation Object Model Code Examples