To add an assembly reference, you first require a reference to the target project. To get one, you can use the Source Model DXCore service, for example:
ProjectElement projectElement = CodeRush.Source.ActiveProject;
Read more…
You can add new projects from the Visual Studio built-in project templates to the current solution using the DXCore Solution service:
CodeRush.Solution.AddProject("ProjectTemplateName", "UniqueProjectName");
Read more…
Note, this article has been moved to the official DevExpress Support Center site. Please refer to the moved article as it might have further updates or additional comments. Thank you.
A DXCore plug-in is usually represented by a single assembly. It might also include some additional data, for example, language dictionaries for the Spell Checker CodeRush plug-in and, probably, setting files, such as shortcuts. To install the plug-in, simply copy an assembly to the Community Plug-ins folder that looks like this in most cases:
%Documents%\DevExpress\IDE Tools\Community
where %Documents% is your Windows Documents folder.
Read more…
Provides access to the source model services. This DXCore service contains lots of useful APIs for working with the source code of the entire solution hierarchy.
Read more…
The Project service has a pretty short list of functions. This service is intended to manipulate projects of an active solution, and provides access to the start-up project, active project, and count of opened projects. All methods and properties work with an instance of the DevExpress.CodeRush.Core.Project type.
Methods of this service:
Name
|
Description
|
GetEnumerator |
Returns enumerator of all projects in the active solution. |
Read more…
Note, this article has been moved to the official DevExpress Support Center site. Please refer to the moved article as it might have further updates or additional comments. Thank you.
To programmatically add a file to a specific project, you can use the AddFileToProject method from the DXCore Solution service. Here is its definition:
public void AddFileToProject(string projectName, string filePath)
This method adds the specified file to the project with the given name. The project must be open in Visual Studio and be part of the active solution.
Read more…
The Solution service provides methods for adding, removing, and renaming project items of the current opened solution.
Read more…