다음을 통해 공유


IVsSolution2 Interface

Provides top-level manipulation or maintenance of the solution.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
<GuidAttribute("95C6A090-BB9E-4BF2-B0BE-F1D04F0ECEA3")> _
<InterfaceTypeAttribute()> _
Public Interface IVsSolution2 _
    Inherits IVsSolution
[GuidAttribute("95C6A090-BB9E-4BF2-B0BE-F1D04F0ECEA3")]
[InterfaceTypeAttribute()]
public interface IVsSolution2 : IVsSolution
[GuidAttribute(L"95C6A090-BB9E-4BF2-B0BE-F1D04F0ECEA3")]
[InterfaceTypeAttribute()]
public interface class IVsSolution2 : IVsSolution
[<GuidAttribute("95C6A090-BB9E-4BF2-B0BE-F1D04F0ECEA3")>]
[<InterfaceTypeAttribute()>]
type IVsSolution2 =  
    interface 
        interface IVsSolution 
    end
public interface IVsSolution2 extends IVsSolution

The IVsSolution2 type exposes the following members.

Methods

  Name Description
Public method AddVirtualProject Adds a type of virtual project that is not created by clicking OpenProject on the New menu to open the solution.
Public method AddVirtualProjectEx Assigns the original GUID to the project when it is recreated the next time the solution is opened.
Public method AdviseSolutionEvents Establishes client notification of solution events.
Public method CanCreateNewProjectAtLocation Determines whether a new project can be created at a given location.
Public method CloseSolutionElement Programmatically closes a document, a project, or the entire solution.
Public method CreateNewProjectViaDlg Controls options for the Create New Project dialog box.
Public method CreateProject Creates or opens a project.
Public method CreateSolution Creates a new solution.
Public method GenerateNextDefaultProjectName Generates the next default project name given a specific path.
Public method GenerateUniqueProjectName Generates a unique project name, given a root project name.
Public method GetGuidOfProject Returns the unique identifier for a project in the solution.
Public method GetItemInfoOfProjref Obtains the required property for the specified project item reference.
Public method GetItemOfProjref Returns a hierarchy and hierarchy item pair for the specified project reference string.
Public method GetProjectEnum Returns an enumerator for all the projects in the solution.
Public method GetProjectFactory(UInt32, array<Guid[], String, IVsProjectFactory%) Returns a project factory. (Inherited from IVsSolution.)
Public method GetProjectFactory(UInt32, Guid%, String, IVsProjectFactory%) Returns a project factory.
Public method GetProjectFilesInSolution Compiles a list of the specified projects in the solution.
Public method GetProjectInfoOfProjref Obtains the required property for the specified project reference.
Public method GetProjectOfGuid Returns the project in the solution, given a unique identifier.
Public method GetProjectOfProjref Returns a hierarchy for the specified project reference string.
Public method GetProjectOfUniqueName Returns the project in the solution, given a unique name.
Public method GetProjectTypeGuid Returns the project type, given a GUID.
Public method GetProjrefOfItem Returns a project reference string for the specified hierarchy and hierarchy item pair.
Public method GetProjrefOfProject Returns a project reference string for the specified hierarchy.
Public method GetProperty Returns the specified property of the solution.
Public method GetSolutionInfo Returns the required solution file information.
Public method GetUniqueNameOfProject Returns the unique name, given a project in the solution.
Public method GetVirtualProjectFlags Determines how the virtual project was added to the Solution Explorer.
Public method OnAfterRenameProject Completes the renaming of a project.
Public method OpenSolutionFile Opens a solution file of the type .sln, .dsw, or .vbg.
Public method OpenSolutionViaDlg Controls options for the Open Solution dialog box.
Public method QueryEditSolutionFile Determines whether the solution file can be changed.
Public method QueryRenameProject Determines whether the project can be renamed.
Public method RemoveVirtualProject Removes a virtual project from the solution.
Public method SaveSolutionElement Programmatically saves a document, a project, or the entire solution.
Public method SetProperty Generically sets properties of the solution.
Public method UnadviseSolutionEvents Disables a client from receiving notifications of solution events.
Public method UpdateProjectFileLocation Notifies a solution of a project file location change.

Top

Remarks

A project reference is a string value that is used as a unique project identifier and that is independent of which solution uses the project. The project reference is composed of the following:

  • Path

  • Project name

  • Project type

  • Project GUID

  • Project type GUID

Each __VSPROPID must return a VARIANT structure filled with the proper VT_ type. The caller may assume that the VT_ is correct; that there is no need to call VariantChangeType, or to verify the type, beyond an ASSERT to make sure there weren't header file mismatches and related problems.

This same logic applies to the caller when setting the property. The solution will assume that the caller has passed a VARIANT already converted to the proper VT_ type.

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace