SixPairs

February 24, 2011

Visual Studio Package Events Sample

Filed under: VSPackage — Ceyhun Ciper @ 19:21

Capturing VS events inside a VSPackage

In order to capture events (such as “Solution Opened”) in a VSPackage, you must already have a pointer to the DTE in your control; this pointer is usually passed to your control from your tool window. And of course, this cannot be done during the construction phase of the tool window; it must be done after the tool window is created.

Here is a simplistic view of the sequence of events:

image

A sample package is published @ Visual Studio Gallery.

 

image

Assembly Reference Resolver

Filed under: MSBuild — Ceyhun Ciper @ 16:39

Programmatically Resolve Assembly Name to Full Path

Sometimes I need to turn an assembly name like “system.xml” or “system.xml,version=2.0” into a path to the actual file for that assembly. This is a tricky problem considering the assembly name might be for a product installed in Program Files or elsewhere. So I posted an “Assembly Reference Resolver” package to the Visual Studio Gallery.

image

image

Create a free website or blog at WordPress.com.