http://blogs.clariusconsulting.net

stats
477 posts and blogging

Latest Posts

How to tweet automatically when you push a new package to nuget.org

Wouldn’t it be nice if your followers could be notified whenever you publish a new version of a NuGet package? Currently, nuget.org offers no support for this, but with the following tricks, you can get it working without programming. The essential idea is to use the OData feed that nuget.org exposes to build an RSS [...]

NuDoc: A .NET XML API Documentation Reader

A couple days ago I was toying with the idea of generating a static API documentation site in markdown ready for hosting in GitHub. The idea is to make it part of the project wiki, so that anyone can very easily improve the code documentation, and later on somehow allow project authors/contributors to merge back [...]

Automatic component registrations in Autofac

I just had to adapt my favorite IoC container to do some of the things MEF does out of the box, namely registering all classes that have a certain attribute (in MEF’s case, [Export]). This is very easy with Autofac. I first created the attribute that would mark my “components” for registration (aka “exports”): /// [...]

Increase developer productivity with NuGet packages with NuGet References

A typical solution usually has many projects, and many more NuGet packages in use:   How do you get a glance of what packages are installed on each project? Typically, you’d just open each of the packages.config XML files, or worse, go to the “Manage NuGet Packages…” dialog:     Which brings up a pretty [...]

NuGet References: publishing my first open source extension to the DevStore

Last week I had the pleasure of spending time with a bunch of friends at the OuterConf 2013, including pretty much the entire NuGet team. I also could attend to the hackathon they organized, and I got to hack what I think is a pretty cool Visual Studio 2012 extension: NuGet References. An improved NuGet [...]

How to perform regular expression based replacements on files with MSBuild

And without a custom DLL with a task, too . The example at the bottom of the MSDN page on MSBuild Inline Tasks already provides pretty much all you need for that with a TokenReplace task that receives a file path, a token and a replacement and uses string.Replace with that. Similar in spirit but [...]

How to access the raw markdown source for a github wiki page

This is not entirely obvious (at least it wasn’t for me), but since Github wikis are actually backed by a proper Git repo, I figured it should be possible to access the raw markdown for a page by using Github’s https://raw.github.com/ style URLs. After some minor trial/error, it turns out to be very predictable (as [...]

Documenting user interfaces in a mouse-less touch UI

“Old” apps rely on mouse pointing and tooltips to explain what a given button is for. Maybe there is text associated with the button, but you can only put so much text without wasting useful screen state. More so in a phone or tablet app. I’ve seen a trend in Google apps where they put [...]

How to exclude copy local referenced assemblies from a VSIX

When you add library references to project that are not reference assemblies or installed in the GAC, Visual Studio defaults to setting Copy Local to True: If, however, those dependencies are distributed by some other means (i.e. another extension, or are part of VS private assemblies, or whatever) and you want to avoid including them [...]

How to change the target VSIX file name

When creating a VSIX or VS Package extension to VS, the default .vsix file name matches the project assembly name. Usually this is too long. So if you want to change it to be a short name, you have to edit the project file and add the following property: <PropertyGroup> ... <TargetVsixContainerName>MyCoolExtension.vsix</TargetVsixContainerName> Happy extending