492 posts and blogging

Latest Posts

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 [...]

Improving the state of the art in API documentation sites

Go straight to the site if you want: You can then come back and continue reading Compare some of the most popular NuGet packages API documentation sites: Json.NET EntityFramework NLog Autofac You see the pattern? Huge navigation tree views, static content with no comments/community content, very hard (if not impossible) to search/filter, etc. These [...]

Contributing to OSS projects made easy

I recently came across what I believe is a missing feature (bug?) in Json.NET most excellent library: when using custom constructor, default values are not populated for properties Being open source, I just went to its GitHub project, created the mentioned Issue, and proceeded to fork the repo. Immediately after getting the source and opening [...]