A blog about software development and software craftsmanship.

Navigation

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

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: With the Empty you end up with an empty project. That is, no Web API dependencies included, no OWIN configuration, no basic wiring done. With MVC or Web API you end up…

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…

AngularJS and WinJS in a Windows Phone 8.1 App

In this post I'll run you through a sample on how to include AngularJS in a WinJS Windows Phone 8.1 app. I won't put much emphasis on the actual app code, the integration part is more interesting. One word of caution though: The integration done here is a bit more than the usual quick and dirty sample but still not perfect. More on that later. Getting the basic project ready Create a new JavaScript Blank…

200 OK // Welcome

I moved my MSDN blog over to this Ghost Blog instance that I host on my Azure account. To my suprise the setup was super easy. Basically fire up a new Azure Web Site and use the Ghost Blog Image from the gallery to get started. After the Azure web site setup I upgraded the blog to the latest version (v0.4.2) and rolled out a new template. A few customizations here and there -…

Little Helper - Random Contact/Name Generator

I am writing a lot of sample code and usually I have to fill my samples with some random data. A typical entity in most scenarios is a person or a contact. Since I am tired with putting in some static names here and there and copy and paste them between samples, I wrote a little library that generates random contact sequences. It takes the most common first and last names of the US and generates…