DXCore Services – Solution
October 21st, 2010
The Solution service provides methods for adding, removing, and renaming project items of the current opened solution.
Here they are:
Name |
Description |
AddDirectoryToProject | Adds the specified directory to the project with the given name. The project must be open in Visual Studio, and part of the active solution. |
AddFileToProject | Removes the specified file with the given name from the project. The project must be open in Visual Studio, and part of the active solution. |
AddProject(String, String) | Adds a new project with the given name of the specified template (e.g. “ClassLibrary.zip”). |
AddProjectReference(String, String) | Adds the given project reference to the specified project. |
ExcludeFileFromProject | Removes the specified file with the given name from the project. The project must be open in Visual Studio, and part of the active solution. |
FindEnvDTEProject(String) | Locates the EnvDTE.Project with the specified name in the active solution. If not found, null is returned. |
FindEnvDTEProjectByHashCode(Int32) | Locates the EnvDTE.Project with the specified hash code in the active solution. If not found, null is returned. Note that it is hidden from Intellisense. |
FindProjectItemByName | Returns an instance of the EnvDTE.ProjectItem type by specified name. |
FindProjectItemByPath | Returns an instance of the EnvDTE.ProjectItem type by specified file path. |
FindProjectItemByPathEnding | Searches recursively among the items of the project and returns an item with a path, which ends with a given string. |
ProjectDirectoryIsExist | Checks whether or not the specified directory exists in a project with a given name. The project must be opened in Visual Studio and be a part of the active solution. |
RemoveFileFromProject | Removes the specified file with the given name from the project, and physically deletes it. The project must be open in Visual Studio, and part of the active solution. |
RenameFileInProject | Renames the specified file from the project with the given path. The project must be open in Visual Studio and part of the active solution. |
Properties:
Name |
Description |
Active | Returns an instance of the active opened Solution of type EnvDTE.Solution. |
AllProjects | Gets enumerator for all available projects. |