VCProjectReference.Culture Property
Gets the culture for the selected reference.
Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
'Declaração
ReadOnly Property Culture As String
Get
string Culture { get; }
property String^ Culture {
String^ get ();
}
abstract Culture : string
function get Culture () : String
Property Value
Type: System.String
A enumResourceLangID value.
Implements
Examples
See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.
The following example code lists the Culture property value for each reference in the project:
[Visual Basic]
' Add a reference to Microsoft.VisualStudio.VCProjectEngine.
' This sample displays the build number of every file
' referenced in a Visual C++ project. Therefore, make sure
' you have a Visual C++ project with references loaded before
' running this code.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
Sub Test()
Dim proj As Project
Dim vcproj As VCProject
Dim ref As VCReference
On Error Resume Next
' Loop each project in the solution.
For Each proj In DTE.Solution.Projects
vcproj = Nothing
vcproj = CType(proj.Object, VCProject)
' If this is a Visual C++ project.
If Not vcproj Is Nothing Then
' Loop each reference in the Visual C++ project.
For Each ref In vcproj.VCReferences
MsgBox("The culture for the file referenced by '" & _
ref.Name & "' is '" & ref.Culture & "'.")
Next
End If
Next
End Sub
End Module
.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.