Share via


Solution4 인터페이스

IDE(통합 개발 환경)에서 모든 프로젝트 및 솔루션의 전반적인 속성을 나타냅니다. Solution, Solution2Solution3을 대체합니다.

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

구문

‘선언
<GuidAttribute("CDA7305C-78B6-4D9D-90AD-93EBE71F9341")> _
Public Interface Solution4 _
    Inherits Solution3
[GuidAttribute("CDA7305C-78B6-4D9D-90AD-93EBE71F9341")]
public interface Solution4 : Solution3
[GuidAttribute(L"CDA7305C-78B6-4D9D-90AD-93EBE71F9341")]
public interface class Solution4 : Solution3
[<GuidAttribute("CDA7305C-78B6-4D9D-90AD-93EBE71F9341")>]
type Solution4 =  
    interface
        interface Solution3
    end
public interface Solution4 extends Solution3

Solution4 형식에서는 다음과 같은 멤버를 노출합니다.

속성

  이름 설명
Public 속성 AddIns (Solution3에서 상속됨)
Public 속성 AddIns 솔루션과 연결되어 있고 현재 사용할 수 있는 모든 추가 기능이 포함된 AddIns 컬렉션을 가져옵니다.
Public 속성 Count (Solution3에서 상속됨)
Public 속성 Count 솔루션에 들어 있는 프로젝트의 수를 나타내는 값을 가져옵니다.
Public 속성 DTE (Solution3에서 상속됨)
Public 속성 DTE 최상위 확장성 개체를 가져옵니다.
Public 속성 Extender[String] (Solution3에서 상속됨)
Public 속성 Extender[String] 이 개체에 대해 존재하는 요청된 Extender 개체를 가져옵니다.
Public 속성 ExtenderCATID (Solution3에서 상속됨)
Public 속성 ExtenderCATID 개체의 Extender CATID(범주 ID)를 가져옵니다.
Public 속성 ExtenderNames (Solution3에서 상속됨)
Public 속성 ExtenderNames 개체에 대해 사용할 수 있는 Extender의 목록을 가져옵니다.
Public 속성 FileName (Solution3에서 상속됨)
Public 속성 FileName 인프라입니다. 파일 이름을 가져옵니다.
Public 속성 FullName (Solution3에서 상속됨)
Public 속성 FullName 개체 파일의 전체 경로와 이름을 가져옵니다.
Public 속성 Globals (Solution3에서 상속됨)
Public 속성 Globals 솔루션 파일(.sln), 프로젝트 파일 또는 사용자의 프로필 데이터에 저장할 수 있는 모든 변수 값을 포함하는 Globals 개체를 가져옵니다.
Public 속성 IsDirty (Solution3에서 상속됨)
Public 속성 IsDirty 인프라입니다. 솔루션이 변경되었는지(수정되었지만 저장되지 않았는지) 여부를 확인합니다.
Public 속성 IsOpen (Solution3에서 상속됨)
Public 속성 IsOpen 솔루션이 열려 있는지 여부를 가져옵니다.
Public 속성 Parent (Solution3에서 상속됨)
Public 속성 Parent Solution2 개체의 바로 위 부모 개체를 가져옵니다.
Public 속성 Projects (Solution3에서 상속됨)
Public 속성 Projects 현재 솔루션에 있는 프로젝트의 컬렉션을 가져옵니다.
Public 속성 Properties (Solution3에서 상속됨)
Public 속성 Properties Solution2 개체와 관련된 모든 속성의 컬렉션을 가져옵니다.
Public 속성 Saved (Solution3에서 상속됨)
Public 속성 Saved 마지막으로 저장하거나 연 후에 솔루션이 수정되지 않았는지 여부를 나타내는 값을 가져오거나 설정합니다.
Public 속성 SolutionBuild (Solution3에서 상속됨)
Public 속성 SolutionBuild 솔루션에 대한 SolutionBuild 개체를 가져옵니다. 이 개체는 솔루션 수준에서 빌드 자동화 모델의 루트를 나타냅니다.
Public 속성 TemplatePath[String] (Solution3에서 상속됨)
Public 속성 TemplatePath[String] GetProjectTemplate 으로 대체되었습니다.

위쪽

메서드

  이름 설명
Public 메서드 AddFromFile(String, Boolean) (Solution3에서 상속됨)
Public 메서드 AddFromFile(String, Boolean) 시스템에 이미 저장된 프로젝트 파일을 기반으로 솔루션에 프로젝트를 추가합니다.
Public 메서드 AddFromTemplate(String, String, String, Boolean) (Solution3에서 상속됨)
Public 메서드 AddFromTemplate(String, String, String, Boolean) 기존 프로젝트 파일 및 해당 파일에 포함되어 있는 모든 항목 또는 하위 디렉터리를 지정된 위치에 복사하고 이를 솔루션에 추가합니다.
Public 메서드 AddFromTemplateEx 기존 프로젝트 파일 및 해당 파일에 포함되어 있는 모든 항목 또는 하위 디렉터리를 지정된 위치에 복사하고 이를 솔루션에 추가합니다.
Public 메서드 AddSolutionFolder(String) (Solution3에서 상속됨)
Public 메서드 AddSolutionFolder(String) 솔루션 폴더를 ProjectItems 컬렉션에 추가합니다.
Public 메서드 Close(Boolean) (Solution3에서 상속됨)
Public 메서드 Close(Boolean) 현재 솔루션을 닫습니다.
Public 메서드 Create(String, String) (Solution3에서 상속됨)
Public 메서드 Create(String, String) 지정된 디렉터리에 지정한 이름의 빈 솔루션을 만듭니다.
Public 메서드 FindProjectItem(String) (Solution3에서 상속됨)
Public 메서드 FindProjectItem(String) 프로젝트의 항목을 찾습니다.
Public 메서드 GetEnumerator() (Solution3에서 상속됨)
Public 메서드 GetEnumerator() 컬렉션의 항목에 대한 열거형을 반환합니다.
Public 메서드 GetProjectItemTemplate(String, String) (Solution3에서 상속됨)
Public 메서드 GetProjectItemTemplate(String, String) 지정된 프로젝트 항목 템플릿에 대한 경로를 반환합니다.
Public 메서드 GetProjectItemTemplates(String, String) (Solution3에서 상속됨)
Public 메서드 GetProjectItemTemplates(String, String) 지정한 프로젝트에 대해 프로젝트 항목 템플릿의 컬렉션을 반환합니다.
Public 메서드 GetProjectTemplate(String, String) (Solution3에서 상속됨)
Public 메서드 GetProjectTemplate(String, String) 지정된 프로젝트 템플릿에 대한 경로를 반환합니다.
Public 메서드 Item(Object) (Solution3에서 상속됨)
Public 메서드 Item(Object) Projects 컬렉션의 인덱싱된 멤버를 반환합니다.
Public 메서드 Open(String) (Solution3에서 상속됨)
Public 메서드 Open(String) 지정한 솔루션을 엽니다.
Public 메서드 ProjectItemsTemplatePath(String) (Solution3에서 상속됨)
Public 메서드 ProjectItemsTemplatePath(String) GetProjectItemTemplate 으로 대체되었습니다.
Public 메서드 Remove(Project) (Solution3에서 상속됨)
Public 메서드 Remove(Project) 지정한 프로젝트를 솔루션에서 제거합니다.
Public 메서드 SaveAs(String) (Solution3에서 상속됨)
Public 메서드 SaveAs(String) 솔루션을 저장합니다.

위쪽

설명

Solution4 개체는 IDE의 현재 인스턴스에 속한 모든 프로젝트 및 솔루션 전반의 속성 컬렉션입니다. Solution4 개체에는 래핑된 프로젝트, 하위 프로젝트, 최상위 프로젝트 등 모든 프로젝트의 프로젝트 요소가 포함됩니다.

DTE.Solution을 사용하여 이 개체를 참조합니다. MiscFiles 또는 SolutionItems 같은 가상 프로젝트를 참조하려면 Solution4.Item(EnvDTE.Constants.vsProjectKindMisc) 또는 Solution4.Item(EnvDTE.Constants.vsProjectKindSolutionItems)을 사용하십시오.

예제

이 추가 기능 코드를 실행하는 방법에 대한 내용은 방법: 자동화 개체 모델 코드의 예제 컴파일 및 실행을 참조하십시오.

Public Sub OnConnection(ByVal application As Object, _
 ByVal connectMode As ext_ConnectMode, ByVal addInInst As Object, _
 ByRef custom As Array) Implements IDTExtensibility2.OnConnection
    _applicationObject = CType(application, DTE2)
    _addInInstance = CType(addInInst, AddIn)
    Solution4Example(_applicationObject)
End Sub

Sub Solution4Example(ByVal dte As DTE2)
    ' This function creates a solution and adds a Visual C# Console
    ' project to it.
    Try
        Dim soln As Solution4 = CType(DTE.Solution, Solution4)
        Dim csTemplatePath As String
        ' This path must exist on your computer.
        ' Replace <file path> below with an actual path.
        Dim csPrjPath As String = "<file path>"
        MsgBox("starting")
        ' Get the project template path for a C# console project.
        csTemplatePath = CType(soln.GetProjectTemplate _
        ("ConsoleApplication.zip", "CSharp"), string)
        ' Create a new C# Console project using the template obtained 
        ' above.
        soln.AddFromTemplate(csTemplatePath, csPrjPath, _
        "New CSharp Console Project", False)
        MsgBox("done")
    Catch ex As System.Exception
        MsgBox(ex.ToString)
    End Try
End Sub
using System.Windows.Forms;
public void OnConnection(object application,
 Extensibility.ext_ConnectMode connectMode, object addInInst,
 ref System.Array custom)
{
    _applicationObject = (DTE2)application;
    _addInInstance = (AddIn)addInInst;
    // Pass the applicationObject member variable to the code example.
    Solution4Example((DTE2)_applicationObject);
}

public void Solution4Example(DTE2 dte)
{
    // This function creates a solution and adds a Visual C# Console
    // project to it.
    try{
        Solution4 soln = (Solution4)_applicationObject.Solution;
        String csTemplatePath;
        // The file path must exist on your computer.
        // Replace <file path> below with an actual path.
        String csPrjPath = "<file path>";
        "<file path>MessageBox.Show("Starting...");
        "<file path>"<file path>csTemplatePath = 
        soln.GetProjectTemplate("ConsoleApplication.zip", "CSharp");
        // Create a new C# Console project using the template obtained 
        // above.
        soln.AddFromTemplate(csTemplatePath, csPrjPath,
          "New CSharp Console Project", false);
        MessageBox.Show("Done!");
    }
    catch(SystemException ex)
    {
        MessageBox.Show("ERROR: " + ex);
    }
}

참고 항목

참조

EnvDTE100 네임스페이스