A blog about software development and software craftsmanship.

Navigation

Design Time WPF XAML Resource Dictionaries

True to the motto "oldie but a goldie" I have a simple solution for a typical problem arising in a modular WPF application: If you have a setup where your Resource Dictionary is located in another project, the designer is very likely to be ignorant about its contents. Merging the dictionary into your App.xaml Resource node will handle the runtime situation correctly, but VS is likely to fail in showing the resource at design time…

Replacing Notepad with your Favorite Editor

We all love our good old Notepad. Don't we? Especially when other tools have configured notepad.exe as their default "editor", or file associations link to notepad.exe. For all those whose love is fading, I have a simple solution at hand. I've written a little node.js CLI application that allows you to define a replacement for notepad.exe. To get started read the installation guidelines on github. For the impatient (example for Sublime): npm…

A tiny ASP.NET vNext Template

TL;DR: the template on GitHub. Some time ago I released a simple OWIN-based ASP.NET Web API template that was meant as a quick and easy starting point for developing SPA applications. The tempalte was released as Visual Studio template. A reader asked my if I would provide an update for Visual Studio 2015 (RC). The answer is a clear yes and no. With VS2015 and the new ASP.NET version on the doorstep it…

Roslyn Diagnostics and Code Fixes

Together with my colleague Ricardo, I put together a set of Roslyn code diagnostics that enforce some best practices when dealing with async code in C#/.NET. To make use of them, you need the latest CTP of Visual Studio 2015. The source code for the diagnostics and fixes is over at GitHub: https://github.com/olohmann/AsyncAwaitAnalyzer You can pull in a NuGet Package to use them directly in a VS2015 project: Install-Package AsyncAwaitAnalyzer -Pre…

A very basic OWIN ASP.NET Web API Single Page Application Template

Update 2015-05-12: Already on Visual Studio 2015 or Visual Studio Code? Check out my blog post on an updated version of this template for VS2015 that uses Yeoman and ASP.NET vNext. You want to develop a simple Single Page Application (SPA) with ASP.NET Web API as the REST backend in single web project? Read this article and you will never use the standard template again. Here is the current situation in Visual Studio 2013…

wget and curl Alias in PowerShell

Today I needed to fetch some data from the network in a PowerShell console. If you have a UNIX background you might be used to things like wget or curl. PowerShell has actually a few default aliases on Invoke-WebRequest that map to these UNIX tools: Sure, these aliases behave a bit differently compared to the original command line API, but the simple download is extremely easy: wget http://www.oliver-lohmann.me/content/images/2014/Jun/create-vs-project…