-
Notifications
You must be signed in to change notification settings - Fork 19
Home
Clide is an intuitive API to automate and extend Visual Studio.
Clide is distributed as a NuGet package and can be installed from Visual Studio by searching for the "Clide" package or running the following command from the Package Manager Console:
install-package Clide
Once installed, your project will get an assembly reference to Clide.dll and that's all you need.
In your package class static constructor, add the following line:
LocalResolver.Initialize(Path.GetDirectoryName(typeof(MyPackage).Assembly.Location));
This allows Clide to ensure your package will get at least the version of Clide it was built with (or a greater version if deployed by another extension). But it will never get an older version deployed by another extension, if present.
Then, in your package Initialize method:
IDevEnv devEnv = Host.Initialize(this);
The IDevEnv interface is a usability entry point for discovering the functionality exposed by Clide.
Finally, edit your .vsixmanifest file, add the following node under the Content node:
<CustomExtension Type="ClideComponent">|%CurrentProject%|</CustomExtension>
Add a similar line for every assembly in your extension that is using Clide's common Composition functionality (meaning, has classes which are decorated with the [Component] attribute).
You can create Commands, setup Tracing and Diagnostics, create User Settings with their corresponding tools options page. All of Clide components leverage a common Composition functionality, making your code loosely coupled and easily testable.
Take a look at the available how to code samples too.
