489 posts and blogging

Latest Posts

Joining Xamarin

[Cross-posted from my new blog] Back in 2001 I was making as much money as you could, programming in a language that I had grown to hate: Visual Basic 6. I remember vividly my first encounter with .NET. I could totally see the upcoming sea change, and how anyone programming in anything but .NET was [...]

Things are changing, again.

You could feel something was changing back in 2000 and the next few following years. It wasn’t the so many times predicted end of the world, but It was Microsoft PDC time instead (or Win32 Professional Developers Conference for those who are old enough). Microsoft was proudly presenting its latest developments like the brand new [...]

OutDir vs OutputPath

Which one should you use? Seems like OutputPath is the way to go, since it’s the one that is specified on every project you create, right inside the Debug or Release configuration. From C:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets, however, we learn: OutDir: Indicates the final output location for the project or solution. When building a solution, OutDir can be [...]

Smarter Visual Studio Template Authoring

From Clarius VisualStudio Targets project: The out of the box experience for authoring templates in Visual Studio is a multi-step process that isn’t very amenable to incremental improvements. An exported .zip file does not encourage rapid iteration . An alternative way introduced in VS2010 was a new project template.aspx) to generate a project (or item) [...]

Complex traces you can actually understand by leveraging Activity Tracing

Activity tracing is part of a feature that was initially introduced with WCF, named End-to-End Tracing. Its underlying implementation, however, is baked into the XmlWriterTraceListener and does not depend on WCF in any way. Currently it’s only supported in the SystemDiagnostics implementation. So what is activity tracing? It can be summarized as: Activity tracing are [...]

How to transform T4 templates on build without installing a Visual Studio SDK

The MS recommended way is to just use the Microsoft.TextTemplating.targets which come with the Visual Studio Visualization and Modeling SDK. It makes me slightly nervous that it requires a little known SDK that is hosted on rather than something more “official” like the MSDN Download Center, where the proper VS SDK lives. It also [...]

How to create a Visual Studio extensibility project that is compatible with VS 2010, 2012 and 2013

For most common project types, you can just create a project in VS2010 and open it in 2012 and 2013 just fine. For some others (like VS package or VSIX projects), you may find Visual Studio wants to perform a one-way conversion:   The first check that was introduced with VS2012 was to require a [...]

Extending Visual Studio: Good Test Coverage Is Possible

A World of Pain? It’s not quite uncommon to see developers despair when doing Visual Studio Extensibility (VSX) work. In addition to a myriad new APIs to learn (which can be pretty intimidating), it seems up-front so alien to the typical development work you do: you have to plug into someone else’s environment, you have [...]

How to install a Visual Studio extension with templates via an MSI

The original story around VSIX deployment via an MSI was that simply copying it to the %VSInstallDir%Common7IdeExtensionsYour CompanyYour ProductVersion was enough. But alas, devil is in the details, and a fairly complex matrix of supported and unsupported features depending on the deployment style is also available on MSDN. However, whenever templates are involved, the general [...]

High level overview of Visual Studio Extensibility APIs

If your head is dizzy with the myriad VS services and APIs, from EnvDTE to Shell.Interop, this should clarify a couple things. First a bit of background: APIs on EnvDTE (DTE for short, since that’s the entry point service you request from the environment) was originally an API intended to be used by macros. It’s [...]