다음을 통해 공유


VSProject.CreateWebReferencesFolder 메서드

프로젝트의 Web References 폴더를 만듭니다.

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

구문

‘선언
Function CreateWebReferencesFolder As ProjectItem
ProjectItem CreateWebReferencesFolder()
ProjectItem^ CreateWebReferencesFolder()
abstract CreateWebReferencesFolder : unit -> ProjectItem
function CreateWebReferencesFolder() : ProjectItem

반환 값

형식: ProjectItem
ProjectItem 개체를 반환합니다.

설명

Web References 폴더가 이미 있으면 이 속성은 기존 폴더의 ProjectItem을 반환합니다.

예제

[Visual Basic]

' Macro Editor
Imports VSLangProj
' This example creates a Web references folder, if it does not 
' already exist, and displays some of the folder properties.
Sub WebReferencesFolderExample()
   ' This example assumes that the first project in the solution is 
   ' either a Visual Basic or C# project.
   Dim aVSProject As VSProject = _
      CType(DTE.Solution.Projects.Item(1).Object, VSProject)
        
   ' Add a new folder if it doesn't already exist.
   If (aVSProject.WebReferencesFolder Is Nothing) Then
       Dim webFolder As ProjectItem
       webFolder = aVSProject.CreateWebReferencesFolder()
   End If
        
   ' Display the name of the Web references folder.
   Dim theFolder As ProjectItem = aVSProject.WebReferencesFolder
   MsgBox("The name of the WebReferences folder is " _
      & theFolder.Name & ".")
        
   If (theFolder.Kind = _
       EnvDTE.Constants.vsProjectItemKindPhysicalFolder) Then
       MsgBox(theFolder.Name & " is a physical folder.")
   End If
   msgbox("There are " & theFolder.ProjectItems.Count.ToString() & _
      " Web references.")
End Sub

.NET Framework 보안

참고 항목

참조

VSProject 인터페이스

VSLangProj 네임스페이스