Scheme of vsSolutionBuildEvent projects
It describes the structure of existing components, illustrates scheme of their work and also shows how it works for Visual Studio Command-Line, MSBuild tools, etc.
Basic scheme for v0.12+
Where:
vsSolutionBuildEvent
It is the main plugin as a VSPackage. Contains main logic for working with events of Visual Studio via Microsoft.VisualStudio.Shell.Interop.
- Implements basic model of events with IVsSolutionEvents and IVsUpdateSolutionEvents2
- Works with priority processing (i.e. with 'Advise..' methods instead of simple subscription with Events from DTE). See MSDN for more details.
- Distributed as .vsix for IDE Visual Studio.
API
Provides API level for working with main library. In general, the vsSolutionBuildEvent implements the Bridge specifications and allows access for most features for any other applications such as the CI.MSBuild, Devenv etc.
Provider
The Provider is part of API level, however, this is designed for quick basic work with the main library. Contains loader etc.
- Used for CI.MSBuild and Devenv projects.
client.vssbe.dll
client.vssbe.dll
is an additional way to work with events from the main library. How to create and use.
Devenv
The vsSolutionBuildEvent Devenv Command-Line is wrapper and event model translator for the main library to support the Visual Studio command-line (devenv.exe).
Why is so strange ?
The VSPackage does not allow any access to Command-line (devenv.exe /devenv.com). This problem is also reported here
However! we can play with command-Line in Add-Ins… well, current component will resolve main problem above. Details of main idea here
You can also see our source code if you want to reproduce this trick for your any other plugin. Read the documentation in links above.
CI.MSBuild (CIM)
The vsSolutionBuildEvent CI.MSBuild is a more powerful and flexible tool compared to Devenv. Because this works with the Microsoft Build Tools.
It is also a wrapper but a little harder; Working with the basic Visual Studio event model requires some conversion/adaptation of everything available for the core library.
This is not Add-Ins and do not require additional installation for any of your environments. Simply configure and use it according to the documentation. You can also see an example on a real project here
Full CI.MSBuild version with standard libraries
The CI.MSBuild works through Provider and also requires main library etc. All this can be configured manually, but modern versions provide nuget packages. Read more
- vsSolutionBuildEvent
- Legacy vsSBE.CI.MSBuild: vsSBE.CI.MSBuild (is no longer maintained)
Scripts …
Script-engines, C# compiler, .target features, … all this as part of user-script layer to work with all what you need at runtime, for example, affecting on the build processes and other.
Basic examples of this here or here, etc.
Other Applications
All this above can be used in some other your tools via API & Provider. You can, for example, use a custom model of events for additional build and/or provide additional GUI for the settings/commands/scripts and other…
Model of events
In general, the vsSolutionBuildEvent works on the event model, i.e.:
- There is an unified event (Visual Studio, MSBuild tools, etc.)
- And there are some actions to be executed …
Your basic interaction will be:
- Choose the Event type.
- Create and configure any actions. You can also call actions inside other actions.
- Enjoy.