Darren Lewis bio photo

Darren Lewis

Professional Nerd

Twitter GitHub StackOverflow

All Posts

2020

Tumbleweed

It really has been quiet on this blog

2017

Extract a .bin disk image file under GNU/Linux

How to convert and extract a .bin file from the GNU/Linux terminal

2016

Install and configure a Samba network share on Debian

The steps to install and configure a network share on Debian and make this accessible from Windows

Angular 2 - Simplifying Module Imports

NgModule was a late addition to Angular 2 first appearing in RC5. One of it’s main purposes is to support lazy loading but it also helps reduce the code required for exporting and importing of components, directives and pipes. This post isn’t an intro to ...

The state of Angular 2 Tooling

The Angular 2 framework has now been released so it’s a great time to jump in and learn the ropes. However, whilst we can relax our attention on the changing API’s in the framework for a short time, we’re still faced with the endlessly changing world of fro...

Obtaining Typescript Definition Files

typings or the types npm organisation?

Azure Code Samples

We’re certainly not short of demo solutions and todo apps but I was pleased to receive an email today with details on the now comprehensive list of Azure code samples available for download here.

What is __proto__ in JavaScript?

If nothing else it has an amusing name, it’s pronounced “dunder proto” due to the double underscore notation it borrows from python.

Solving a failed npm install on the Raspberry Pi

TL;DR If you are struggling with npm install failing on a package you are convinced is no longer a dependency of your current package.json structure. Try clearing out your node_modules folder or take a look at the npm prune command.

Making data available to all express views

In this post I’m going to show you how to make data available to all of your views in an express 4 website. I’ll be using jade in my sample code but this solution is not specific to any view engine.

Digging into remote branches in git

This post assumes a basic understanding of git and the principles of commits, branches and remote repositories. I wrote up this post after playing around with remotes beyond just configuring remote tracking branches for some unrelated work.

2015

Cannot access LocalDb from Visual Studio 2015 Community Edition

Today I was trying to spin up a quick Web API for an angular project I’m working on in a fresh install of Visual Studio 2015 using Entity Framework Code First.  Unfortunately after creating a simple model, when I tried to update-database to make sure all th...

Fixing Angular injector unpr Unknown provider

Error: [$injector:unpr] Unknown provider: SomeServiceProvider <- SomeService <- MainController

Configuring ssh keys

In this post I’ll explain how to setup ssh keys on a Mac so you no longer have to enter a password when connecting to a remote machine using ssh.

Fixing a broken npm update

If you install node and npm using homebrew and later attempt to update npm using the following command you may find yourself “losing” your npm installation at the terminal.

EACCES error on npm install with mean-cli

When generating a new mean application using the mean-cli generator available from http://mean.io you may get the following error:

Fixing Jekyll "unresolved specs" error

My Jekyll installation recently stopped working with following error when I tried to run

2014

Safely delete files and folders in terminal

I discovered a useful command line tool today for OSX called trash. It provides all the power of rm but without the ability to blow your leg off as it moves the affected files and folders to the trash rather than permanently deleting them.

CRM 2013 Solution Export Issue

Recently I was having problems exporting a solution from an on-premise CRM 2013 organisation. Unusually there was no additional log to download and turning on verbose logging allowed me to see the exception being thrown on export but there was no indicatio...

systemform With Id = {guid} Does Not Exist

Solution Import Error systemform With Id = {guid} Does Not Exist

Configuring visual diff and merge tools for git on Windows

There’s plenty of information available on the net for configuring your visual diff/merge tool of choice for git. However, a lot of it is out of date. As of Jan 2014 using git v 1.8.4 this is the concise guide to setting up your visual diff and merge tool(s...

Avoid storing Nuget packages in your Git Repository

Git is a fantastic version control system but it was never designed for storing binary files. They clutter the history and even if removed that history must still be maintained. Ideally a remote pull should be a fast and pain free operation; one of the core...

2012

CRM 2011 SDK Dependency Starter now on Nuget

Each time I want to create a quick project in Visual Studio to connect to CRM 2011 I head to the SDK and pull in Microsoft.Xrm.Sdk then the source code for the helper classes and finally resolve all the missing framework dependencies IdentityModel, Director...

Taking Team Foundation Service for a quick spin

Having just watched Brian Keller’s talk at //Build online I decided to give the new Team Foundation Service offering a spin. It’s free for teams of up to five users and whilst in preview also free for larger teams. No confirmed pricing plans yet so let’s ho...

Windows 8 - Import pictures directly to a custom SkyDrive folder

If you want to import pictures from a camera or any other USB device straight to a custom SkyDrive folder you can’t do this using the Windows 8 Photo Application. By default it will import all photos to your picture library which won’t be linked to your Sk...

Error when saving URL addressed record in CRM 2011 (Rollup 5)

If you’re on Rollup 6 or higher you can ignore this post.

Custom Web Pages with CRM 2011 Look and Feel using knockout.js

In this post (it’s been a while!) I’m looking at building a custom html page (ISV hosted or otherwise) that looks as close as possible to the CRM lookup dialog. This will allow us to provide our users with a seamless experience when moving from OOB function...

.NET Web Development – Now and Next

I recently received an email from a friend and ex-colleague asking about the state of play with respect to web development. Like many of us he’s seen how you can quickly get lost down the rabbit hole with technologies such as JavaScript and all the OS frame...

Changing the scope of the AssignedTo field in TFS 2010 Work Items

This post is related to changes for Team Foundation Server 2010 but a similar process can also be followed for TFS 2008.

2011

NuGet Version Control Workflow

With the release of NuGet 1.6 we now get the ability to control the importing of dependent packages at build time through the injection of a custom .target file into each project within the Visual Studio solution. This may seem unusual for teams that use T...

Delete orphaned branches in TFS 2010

I recently found myself in a situation in our TFS Source Control where I wanted to convert a main folder into a branch. However I was presented with an error message telling me that I couldn’t do this as a branch already existed below this folder. It turn...

AppFabric and WAS 1 Windows Service 0

We recently received a proposal from a supplier for their integration into our backend stock control system. A requirement of the solution is asynchronous communication in both directions so MSMQ was recommended as expected. However, I was surprised to se...

Options for Mobile Application Development

This post is based on my interest recently in current mobile development offerings. Not the specifics of implementation but more around what options are available to us as developers. In this post I won’t be going to go into any specifics as I’m just putt...

Forget the Spec it’s the revenge of the Shiv

Embrace HTML5. Having to support older browsers shouldn't be holding you back.

CRM 4.0 and WCF Data Services

UPDATE: The below post has been sat in my drafts since March 2011. Not sure why I didn’t post it given the title of this site does contain the word musings! Anyway, 6 months on and two projects later I can summarise the Advanced Developer Toolkit as it’s ...

Clearing an observableArray in knockoutjs

I recently had the need to remove all items from a multidimensional observable array and discovered that doing this by reinitialising means you need to call ko.applyBindings(…) again. For performance reasons this isn’t something you want to be doing to oft...

knockout 1.3.0 shaping up nicely

Although knockout 1.3.0 should be coming out of beta shortly I just wanted to put this post out there to express my delight in having seen the new features.  In particular the containerless control flow (which doesn’t strike me as a particularly intuative f...

Managing NuGet at the Visual Studio Solution Level

A particularly useful feature of the NuGet Package Manager extension within Visual Studio 2010 is the ability to manage your packages at the solution level. This can be really useful when you’re creating a new solution containing several projects and you w...

Azure SDK 1.5 without SQLEXRESS

If you’ve come across the error in Visual Studio telling you it failed to initialise the development store you almost certainly don’t have SQLEXPRESS installed or it’s just stopped. If it’s the latter feel free to leave now and fire it up!

Tech Days Windows Phone Camp

I attended a Windows Phone Camp training course on Saturday and wanted to give some feedback on how I think the day went.  This was a free Microsoft UK Tech Days course that I came across by following @ukmsdn (I highly recommend you put them in your followe...

Windows 8 Stack - A clearer perspective

Having now watched the keynotes and a couple of sessions from Build (sans whacks) I’ve found myself still confused about how the new stack built around WinRT hangs together.  Has my recent effort to spend some quality time with javascript on the assumption ...

Stopping selected Windows Services with Powershell

I set all of the VMWare services on my machine to be manual start recently and figured the easiest way to restart when I needed to spin up a VM was with a simple net start ... batch file.

Build Conference is shaping up nicely

I’ve been particularly interested of late in the priciples behind rich client UI on the web serviced through lightweight data services (WCF Data Services etc). Rather than the majority of the developers time being spent in the server code (WebForms codebeh...

My Community Resources

In conversation with my peers I often find myself citing references to information picked up from my common list of community sources (blogs, websites, podcasts, video training etc).  All too often I’m asked “What’s dot net rocks?” or “Who’s Phil Haack?”.  ...

Trendy GitHub yields accounting.js

Every now and again I like to check in on what’s trending on GitHub.  When you get a spare five minutes take a look, I think you’ll find it quite useful, even perhaps a little entertaining.This morning I came across accounting.js.  Whilst I don’t have an im...

More to come

All too often lately I find myself saying “I should blog about that” but something always seems to break down between the keyboard and chair interface resulting in an ever increasing product backlog in my head.  Well no more!  I’m setting myself the challen...

Auto increment assembly version in TFS 2010 build

In my search for an answer to this problem I came across this blog post that provides excellent detail on customisation of the Default Process Template for creating auto incrementing builds on your build server. Nice work Richard.

IIS 7 Powershell Provider under Windows Server 2008 R2

I recently wanted to get access to the IIS Powershell cmdlets on a Windows Server 2008 R2 machine. I initially thought I needed to install the Provider that can be downloaded from iis.net. However, I soon realised this wasn’t correct as running the MSI ga...

Entity Framework and WCF - Three ways to play nice together

Below are the three common issues that always seem to initially catch me out on projects that involve Entity Framework and WCF. They usually manifest themselves with the really helpful error message “The underlying connection was closed…”. You can spin up...

Pluralsight iPad and iPhone Apps

I'm now into my second year as a Pluralsight customer and overall I've been hugely impressed with the quality of their online training material. The only pain point I've felt was the lack of an online player that worked on the iPad. I was therefore deligh...

Hierarchical Work items

I tweeted recently about my wish for hierarchical work items on the TFS check-in dialog within Visual Studio and was somewhat surprised at the number of responses in agreement I received. Hierarchical workitems have been one of the most hyped features of T...

2010

Elegant Caching Service

I was looking for common data caching patterns recently and came across a rather simple but imo very elegant solution for caching on Stack Overflow. The source is below and I’ve included a link to ensure the original author gets full credit.

Lifetime of an Entity Framework Context

I'm currently working on an ASP.NET MVC application that uses Entity Framework 4 and Unity. This project uses Unity for DI and the Repository and UnitOfWork patterns to abstract the EF as much as possible. I won't cover any detail of the use of the latter...

Include and IObjectSet

I recently came across the problem of eager loading some entities via EF when using IObjectSet. I’m using IObjectSet for better test support with my POCO entities. However, whilst ObjectSet implements Include IObjectSet doesn’t. The following blog post p...

Refactoring

I was asked an interesting question today. What is refactoring?

iPad in hand

OK so despite being adamant that I would resist the lure of the iPad, I failed! It was a terribly impulsive purchase but so far not regrets. What I can absolutely confirm though is that it is indeed just a big iPhone.

Visual Studio 2010 Pro Power Tools

For anyone who’s moved across to Visual Studio 2010 I highly recommend taking a look at the online gallery of extensions under Tools -> Extension Manager.

WWPlatform Data Access Sample

Tonight I managed to get this Patterns & Practices team’s excellent sample upgraded to version 2.0 of ASP.NET MVC and Unity.

WCF - Your process does not have access rights to this namespace

Hit this exception whilst trying to spin up a WCF test host in my Windows 7 build. Looks like UAC wants to keep us pinned down but fear not. Run the following at an elevated cmd to sort it:

Keep it simple stupid

No it doesn’t mean you’re stupid. This is a really quick post but I’d like to point anyone about to embark on software design to consider the following wiki article:

ASP.NET MVC ModelView objects

I’m still playing around with Mvc 2 and came across the issue of presenting a composite type within a ModelView object. When creating the view from this type it won’t use the T4 template to generate your view for you or prepopulate from the FormsCollection...

ASP.NET MVC 2 Validation

Just watched a great video over on Channel 9 about the new validation features. Having implemented a framework in our development team that was aiming for full declarative validation I found this really interesting.

2007

Vista UAC

OK its not ideal but with two children and woeful parental controls I’m persisting with it. However, the greatest test of my patience was when I found the lack of secpol on my Home Premium system. So in order to disable prompting of admin accounts I need ...

iPod...actually Apple woes

I recently went through the pain of transfering my iTunes library from one PC to another, never again! The music industry needs to sort it’s act out and quickly when it comes to DRM and Apple just needs to sort out all of their software!

Kids really do have a unique perspective on the world

If you’re not a parent this one may pass you by but I felt compelled to share.

Abandoned Blogs

If a place existed where blogs could go when feeling neglected, I’d say mine would have been there for quite some time!

Xbox 360 - It's a bit like eBay!

Having picked one up before Christmas I can now say I am officially hooked. My poor wife has become an Xbox widow and the kids haven’t eaten for a week due to my choosing between buying food or Gears of War.I’ve played the odd game in the past whether on a...

Blog Editing Tools

I’ve just downloaded a Firefox blog editor extension called Performancing.  It sits in the status bar on Firefox and pops up a basic editor when clicked.  I can see this being really useful for dropping on quick posts whilst browsing.As I’ve posted this ent...

TFS Check Out & Get Latest Version

Over the last few days the guys in our team have started getting conflicts when checking back into source control despite exclusive check-out being set on all projects. It would seem that after doing some research, exclusive check-out in TFS no longer means...

2006

My HP TC1100 Tablet PC

This is probably as sad as it gets but I’m writing this blog on my new (to me anyway) TC1100 HP tablet. Having only ever experienced handwriting recognition on a PDA the accuracy of the tablet is incredible!

Hello…

…and welcome to my blog! Allow me to introduce myself. I'm a senior software developer from Birmingham in the UK. I work purely with Microsoft technologies, which for pretty much everyone nowadays that means .NET. Most of my development is done in C# pro...

comments powered by Disqus