Export (0) Print
Expand All

IVsSolution 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)

[GuidAttribute("7F7CD0DB-91EF-49DC-9FA9-02D128515DD4")]
[InterfaceTypeAttribute()]
public interface IVsSolution

The IVsSolution type exposes the following members.

  NameDescription
Public methodAddVirtualProjectAdds a type of virtual project that is not created by clicking Open Project on the New menu to open the solution.
Public methodAddVirtualProjectExAssigns the original GUID to the project when it is recreated the next time the solution is opened.
Public methodAdviseSolutionEventsEstablishes client notification of solution events.
Public methodCanCreateNewProjectAtLocationDetermines whether a new project can be created at a given location.
Public methodCloseSolutionElementProgrammatically closes a document, a project, or the entire solution.
Public methodCreateNewProjectViaDlgControls options for the Create New Project dialog box.
Public methodCreateProjectCreates or opens a project.
Public methodCreateSolutionCreates a new solution.
Public methodGenerateNextDefaultProjectNameThis method obtains the default name for the next project in the solution (ProjectN).Generates the next default project name given a specific path.
Public methodGenerateUniqueProjectNameGenerates a unique project name, given a root project name.
Public methodGetGuidOfProjectReturns the unique identifier for a project in the solution.
Public methodGetItemInfoOfProjrefObtains the required property for the specified project item reference.
Public methodGetItemOfProjrefReturns a hierarchy and hierarchy item pair for the specified project reference string.
Public methodGetProjectEnumReturns an enumerator for all the projects in the solution.
Public methodGetProjectFactoryReturns a project factory.
Public methodGetProjectFilesInSolutionCompiles a list of the specified projects in the solution.
Public methodGetProjectInfoOfProjrefObtains the required property for the specified project reference.
Public methodGetProjectOfGuidReturns the project in the solution, given a unique identifier.
Public methodGetProjectOfProjrefReturns a hierarchy for the specified project reference string.
Public methodGetProjectOfUniqueNameReturns the project in the solution, given a unique name.
Public methodGetProjectTypeGuidReturns the project type, given a GUID.
Public methodGetProjrefOfItemReturns a project reference string for the specified hierarchy and hierarchy item pair.
Public methodGetProjrefOfProjectReturns a project reference string for the specified hierarchy.
Public methodGetPropertyReturns the specified property of the solution.
Public methodGetSolutionInfoReturns the required solution file information.
Public methodGetUniqueNameOfProjectReturns the unique name, given a project in the solution.
Public methodGetVirtualProjectFlagsDetermines how the virtual project was added to the Solution Explorer.
Public methodOnAfterRenameProjectCompletes the renaming of a project.
Public methodOpenSolutionFileOpens a solution file of the type .sln, .dsw, or .vbg.
Public methodOpenSolutionViaDlgControls options for the Open Solution dialog box.
Public methodQueryEditSolutionFileDetermines whether the solution file can be changed.
Public methodQueryRenameProjectDetermines whether the project can be renamed.
Public methodRemoveVirtualProjectRemoves a virtual project from the solution.
Public methodSaveSolutionElementProgrammatically saves a document, a project, or the entire solution.
Public methodSetPropertyGenerically sets properties of the solution.
Public methodUnadviseSolutionEventsDisables a client from receiving notifications of solution events.
Top

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 VARIANY already converted to the proper VT_ type.

Notes to Callers

Called to manage solutions. IVsSolution is implemented by the environment through the SVsSolution service.

Show:
© 2014 Microsoft