How to target SQL Server 2014 from a Visual Studio 2013 SQL Server Database Project

I’ve just installed SQL Server 2014 and want to check what might break in my current SQL Server 2008 database when I upgrade it.

Thomas LaRock has written a great article providing a list of a dozen things to check before upgrading and I would definitely suggest making this your first port of call if you’re planning an upgrade.  Continue reading

Adding “unknown” file types to your publication package

I’ve been making some updates to a web services project recently (I say recently it was actually months ago but for some reason I haven’t managed to publish this post until now) and the time has come to deploy it to a test environment.  This in itself brought a few challenges but the one that I want to discuss just now is the issue of including unknown file types in your publication package. Continue reading

After namespace change “multiple types were found that match the controller named ‘X'”

I started work on a new MVC 5 project today and after working on it for a short while I decided I wanted to change the name of the web project to [ProjectName].WebUI from just [ProjectName].  So, I renamed the project, updated the project namespace and updated all my files to use the new namespace so my solution was now made up of [ProjectName].sln, [ProjectName].WebUI and [ProjectName].WebUI.Tests.  All good I thought, but then I went to debug it and got this message:

Multiple types were found that match the controller named ‘Home’. This can happen if the route that services this request (‘{controller}/{action}/{id}’) does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the ‘MapRoute’ method that takes a ‘namespaces’ parameter.

Continue reading

How to Install a NuGet package Without an Internet Connection

If, like me, you are currently working on a development PC that doesn’t have access to the internet it can be a pain trying to install and maintain third party packages.  I’m a huge fan of NuGet and I thought that as I didn’t have an internet connected machine I wouldn’t be able to connect to it and download my favourite packages via Visual Studio’s Package Manager.  I was wrong though as it’s possible to use Visual Studio’s Package Manager to install NuGet packages even when you don’t have an internet enabled development machine Continue reading

.Net Extension Methods

Extension Methods – What are they?

They are methods written by you which allow you to extend classes that you cannot modify directly.  These might be classes you’re using from a third party DLL, or maybe you work in an organisation where your business objects are untouchable by a lowly developer such as yourself (and me), or maybe you just want to add some extra functionality to the String class.  If any of these situations ring true then extension methods are something you should know about. Continue reading

How to Unit Test a Private Method with MSTest

Okay so I’m not going to get into the debate about whether or not private methods should be unit tested as that’s not the purpose of this post (for what it’s worth I think they shouldn’t be tested), but as MSTest provides functionality to test private methods it makes sense that I should know how to set a test up for the occasion where a client wants me to write unit tests for private methods. Continue reading

ZeroClipboard Multiple Times on a Single Page

Took my first look at ZeroClipboard the other week and I have to say I like it a lot.

What is ZeroClipboard?

So, what is it?  It’s a small (important), free (very important) and cross-browser (very, very important) library which uses an invisible Adobe Flash movie and JavaScript interface that lets you easily copy text from your website to the clipboard. Continue reading

Infinite Scroll with a Repeater

One of the requirements for a project I have been working on lately is that paging of data is not allowed.  The solution so far had been just to output all the records to a GridView control which was fine until the data behind the application started to grow.  Once where only 50, 100, 200 records were being written out we are now getting 1000+ which, as you might expect, was not ideal for page rendering.

So I’ve looked at introducing paging back into the project but in an infinite scrolling capacity. Continue reading