C# tip, MVC, Non-functional Requirements, Performance

Performance in ASP.net and C# – Bundling and Minification

Another quick post – a really useful feature of MVC that everyone has heard of…and then they seem to forget to do it in practice.

Don’t forget about Bundling and Minification – Rick Anderson explains here how to do it and why it’s important, and a picture tells a thousand words when you see network timings before and after switching on bundling.

Remember, if you don’t see bundling working on your MVC project:

  1. Make sure that the compilation element in your Web.config’s system.web node has the debug = "false";
  2. Check the RegisterBundles class and check if the BundleTable.EnableOptimizations value is set.
    • I don’t actually like this being in my RegisterBundles class – I’d prefer to set this through configuration and not have it embedded in my C# code;
  3. Make sure that the bundling/minification configuration that you’ve set up for your development environment isn’t being copied across to your other environments – you might have planned to debug locally, but you probably don’t want that preference copied across to your acceptance, demonstration or production environments.

This is a really quick and simple way to improve your site’s performance – try it!

Uncategorized

Windows 10 can’t see Windows Phone?

This will be a very quick post.

I’ve been using Windows Phone 10 (Mobile Insider Preview) on my Nokia 820, and tried to connect to my Windows 10 machine. It didn’t show up in the list of available devices on My PC in the Explorer window. It did show up in the Device Manager, but had the dreaded yellow triangle with an exclamation mark.

I did the usual things:

  1. I checked the USB cable – made sure it could transfer data and wasn’t just for charging…nope;
  2. Made sure the phone was unlocked…still nothing;
  3. I followed the troubleshooting options and allowed Windows to search for a driver…that didn’t work;
  4. I rebooted the phone while connected to my Windows PC…nothing new.

So I abandoned it for a while, since I’m on the Windows Mobile Fast Ring, I don’t expect everything to work first time.

But yesterday I connected my Nokia 1520, which is Windows 8.1 – and this didn’t work either. This is when it became a bit of a problem.

Anyway, it’s not a common problem – most people are finding that everything works perfectly first time.

Eventually, after a lot of searching I found a suggestion that the version of Windows 10 could hold the key to the solution. Users who have “Windows 10 Pro N” also need to install an additional media pack from the link below:

http://www.microsoft.com/en-us/download/details.aspx?id=48231

(Original KB article here)

This requires a reboot, but after that both my Nokia 820 and 1520 (Windows 10 Mobile Preview and Windows 8.1) both connect perfectly first time.