Archive | Codenutz Bolts

Solving “A numeric comparison was attempted on” Issue (ReSharper and NuGet)

This is one that’s tripped me up a couple of times, somewhat randomly. I’ve never really tracked down what causes the issue – perhaps moving development between a Mac and an PC, but either way its something that doesn’t require a lot of solving. The issue The error in question reads…

…and is generally […]

Continue Reading 0

TSQL to Kill All Connections to a Database

Awesome snippet of code from Nick Xu’s SQL Server Blog to kill all connections to a database. Really useful when you’re getting messages like ‘Exclusive access could not be obtained because the database is in use’. I should mention – DON’T GO USING THIS ON YOUR PRODUCTION DATABASES!!!

Thank you Nick Xu!

Continue Reading 0

Browser Caching for WordPress on Microsoft Azure

A common problem I’ve found when hosting WordPress on Microsoft Azure is that you’re quite often missing the browser cache settings. Even if you’re using a plug-in like W3 Total Cache and set the browser caching settings on, you’ll find that it doesn’t work. The reason is that most wordpress plugins pretty much assume you’re […]

Continue Reading 0

Making a standard command prompt a visual studio command prompt

Really useful tip I got from a colleague today for adding everything to turn a standard command prompt into a visual studio command prompt. Its really simple – theres a batch file located in your visual studio directory, i.e. ‘C:\Program Files (x86)\Microsoft Visual Studio\11.0\’ (replace the last part with you visual studio version number). The […]

Continue Reading 0

ReSharper Live Template – Mocking an Interface

A short but sweet ReSharper live template that I hook up to the shortcut ‘mock’:

This template is for creating mocks inline with Moq, something I do a lot of when starting up a unit testing class. The DotSettings export file is provided below for easy importing and use: Mock.DotSettings

Continue Reading 0