Parallels 11 or VmWare Fusion 8.x Windows VM is running too slow on Retina MacBook Pro

I’ve been having this problem on my MacBook Pro 2015 Retina edition when running Windows 10 in Parallels 11 or VmWare Fusion 8.x

The machine is just so slow, it is almost intolerable.

After checking what was going on I discovered that the display service was consuming too much CPU.

The fix? Disable Retina support and use scaling instead.  I guess it is just far too many pixels for the VM Host to handle.

Yes, unfortunately the display quality will suffer greatly, but it is not unusable, and the performance boost you get is well worth it.

This works for both VmWare Fusion and Parallels Desktop.

I hope that eventually both companies will solve this.

Update-Database fails in Package Manager Console on Windows 10 Insider Preview with ambiguous type error


, , , ,

This post is about providing a workaround for this problem until Microsoft provide us with a proper fix.

This problem has been reported here:

There seem to be two types that fail due to ambiguity:

  • Microsoft.VisualStudio.Shell.Package
  • NuGet.VisualStudio.IVsPackageInstallerServices

Yet if you have other failing types in your scenario, understand this post and apply the same logic to your specific case.


This workaround fixes the following error:

Type name 'Microsoft.VisualStudio.Shell.Package' is ambiguous, it could be 'Microsoft.VisualStudio.Shell.Package, Microsoft.VisualStudio.Shell.14.0, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or 'Microsoft.VisualStudio.Shell.Package, 
Microsoft.VisualStudio.Shell.10.0, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

To fix this, do the following:

  1. Open Windows PowerShell ISE in admin mode (right click and Run as Administrator)
  2. Open the following file:
  3. Go to line number 126 (Ctrl+G and enter the number)
  4. Find this line:
    • $service = [Microsoft.VisualStudio.Shell.Package]::GetGlobalService($ServiceType)
  5. Replace it with these lines:
    • $accel = [psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators")
       $accel::add(“specificShell”,”Microsoft.VisualStudio.Shell.Package, Microsoft.VisualStudio.Shell.14.0, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”)
       $service = [specificShell]::GetGlobalService($ServiceType)
  6. If your Visual Studio is open, you will need to close it and re-open it, as it caches a copy of this script.


This is a similar fix to the above, but for this error:

Type name 'NuGet.VisualStudio.IVsPackageInstallerServices' is ambiguous, it could be 'NuGet.VisualStudio.IVsPackageInstallerServices, JetBrains.Platform.VisualStudio.SinceVs11, Version=, Culture=neutral, PublicKeyToken=1010a0d8d6380325' or 
'NuGet.VisualStudio.IVsPackageInstallerServices, JetBrains.PsiFeatures.VisualStudio.SinceVs11, Version=, Culture=neutral, PublicKeyToken=1010a0d8d6380325'.

To fix this, do the following:

  1. Open Windows PowerShell ISE in admin mode (right click and Run as Administrator)
  2. Open the following file (replace {NuGetPackagesFolder} with the location of your packages folder in your solution:
    • {NuGetPackagesFolder}\EntityFramework.6.1.3\tools\EntityFramework.psm1
  3. Go to line number 1004 (Ctrl+G and enter the number)
  4. Find this line:
    • $packageInstallerServices = $componentModel.GetService([NuGet.VisualStudio.IVsPackageInstallerServices])
  5. Replace it with these lines:
    • $accel = [psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators")
       $accel::add(“NuGetInstallerServices”,”NuGet.VisualStudio.IVsPackageInstallerServices, JetBrains.Platform.VisualStudio.SinceVs11, Version=, Culture=neutral, PublicKeyToken=1010a0d8d6380325”)
       $packageInstallerServices = $componentModel.GetService([NuGetInstallerServices])
  6. As above, if your Visual Studio is open, you will need to close it and re-open it, as it caches a copy of this script.

The Logic

All I am doing here is quite simple, I am creating a type alias that points to a specific assembly instance, and using that for reference, rather than the version that would resolve into multiple instances.

A Few Notes

The workaround above, particularly the second one, is temporary, and will fail again if you refresh your NuGet package cache before MS come up with a fix for this problem.

Also, since all machines have different configurations, your specific assemblies might be different.  So just replace them above accordingly… you are all devs after all ;)

Of course, to fix, simply re-apply the patch above.

This problem is still present as of Windows 10 Insider Preview Build 14257.rs1_release.160131-1800

Delay email sending in Outlook (like gmail)


, , , , ,

Today I decided to change one annoyance about Outlook… the fact that it sends out emails immediately and there’s no way to ‘undo’.

I have tried alternatives, like ‘explicit sending’, which results in my forgetting that the email didn’t go out, or using ‘delayed sending’, which is a pain, since you need to do it every time.

Wouldn’t it be better if I could have the option to ‘undo’ sending an email, or just let it be otherwise?

So, I’ve written this quick script in VBA which does just that.  In my case, it delays the sending of the email by 5 minutes… if you don’t withdraw it within that time, it simply gets sent… you can change the value to your liking in the code.

To get this done, simply add the following code to your ‘ThisOutlookSession’ class.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
 Const defaultDelayInMinutes As Integer = 5

Dim timeToSend As Date
 Dim mi As Outlook.MailItem

 On Error GoTo ErrorHandler

 timeToSend = Now + TimeSerial(0, defaultDelayInMinutes, 0)

 Set mi = Item
 mi.DeferredDeliveryTime = timeToSend
Exit Sub

 MsgBox "Application_ItemSend: " & Err.Description
End Sub

Hide your mouse cursor in Windows for ALL applications (even Visual Studio)


, , ,

Although Windows already has an option to hide the mouse cursor whilst typing, which can be found under Control Panel/Mouse, this is respected on a ‘per application’ basis.

Unfortunately, many applications, such as Visual Studio, do not respect this setting, and leave the mouse cursor visible whilst typing.

This can be quite annoying, as one tends to type exactly where one clicked, i.e., where the mouse cursor currently is, and especially in the case of developers, the IDE is particularly rich, meaning that the mouse cursor will normally also activate tooltips related to the item they are hovering over.

This is a small script I have written and compiled using AutoHotKey that hides the windows cursor when a user starts typing any alphanumeric (and certain coding-related) characters, and shows it again as soon as a mouse movement is detected.

You can either get the latest executable from here, or you can run it as an AutoHotKey script by downloading the AutoHotKey utility from here

You can find the project landing page here, and my github repository here.

Visual Studio 2012/2013 Page Inspector fails with “Object reference not set to an instance of an object”


, , , , , ,

I’ve had this problem for as long as I can recall.  My page inspector in Visual Studio 2012 never worked… which normally would have been ok, since I could always do the old-school edit+save+refresh routine… but when you know that the feature exists, it is a bugger that it doesn’t work.

I tried everything, from disabling all my extensions and add-ons, to hooking up a debugger to my devenv process… to the obvious google-and-bing-fu manic searches… but got nothing.

If you check your ActivityLog.xml, you will see that Page Inspector is blowing up with a NullReferenceException… no surprise there.

After installing VS2013 I hoped that all of this would go away, but I got the same error.

Page Inspector fails with Object reference not found

Page Inspector fails with Object reference not found

Finally, I had the great brain wave of setting Internet Explorer as my default browser and restarting Visual Studio (I’m a chrome user).

…and voilà… page inspector finally works :(

One would think that by this time, this whole thing about being wired-in to Internet Explorer was a thing of the past… clearly it is not.

I’ve filed a bug report accordingly on Microsoft Connect.


SetSite failed for package [CctSharedPackage]


, , , , , , ,

I’ve seen this exception way too many times in Visual Studio 11 and 12… turns out that it is an issue with Azure SDK 2.2 – and my google-fu skills failed to find a solution online.

Yet… if you look into your C:\Users\[username]\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml file, you’ll find errors on the lines of:

Could not load file or assembly ‘Microsoft.VisualStudio.WindowsAzure.Diagnostics, Version=…

The fix turns out to be quite simple, once you see that error.  This just means that the assembly cannot be found… so hey, just add it to your GAC like so:

Add assembly to GAC

Add assembly to GAC

Voila… problems solved.


Show more tiles on your Windows 8 and 8.1 start screen


, , , , , , ,

Ok, so I’m slowly getting used to the Windows 8+ tiles mode for the start screen, and I’m admittedly preferring it to the old start menu, or the full blow ‘all apps’ view that’s available as of Windows 8.1.

But wouldn’t it be nice if we could make the tiles smaller?

This is actually an option, but quite a hidden option.

This is my tiles view before:

Windows tiles default view

Windows tiles default view

And here is what they look like after:

Smaller windows tiles

Smaller windows tiles

How do I do it? may ask

Simple, just:

  • Open your charms (put your mouse in one of the left corners, or slide your finger from the right edge of the screen, inward).
  • Select Settings
  • Select Tiles
  • Select Show More Tiles
Show more tiles

Show more tiles

Note: This only applies if you select ‘settings’ whilst in ‘Tiles View’ (i.e. not in desktop mode)

I hope this helps someone :)

ASP.NET MVC always throws a System.Globalization.CultureNotFoundException


, , , , ,

I ran into this problem today.

Being an overly pedantic developer, I was annoyed that my ASP.NET MVC project was always silently throwing this exception on startup.  So I dug into the guts of System.Web.dll to find out ‘why’ this exception was being thrown.

It turns out that upon startup, ASP.NET tries to create the CultureInfo for the project by looking for the good old Satellite directories… so far, so good, this makes total sense.

The issue is more about HOW this is done.

The System.Web.Compilation.StandardDiskBuildResultCache class calls its internal FindSatelliteDirectories method.

This, in turn, fetches all the folders (a.k.a. Directories) that it finds in the Temporary ASP.NET files temp folder, and iterates over them to see if any of them are Satellite Directories.

There is a conditional statement to bypass this check if the folder is called ‘assembly’ or ‘hash’, yet it fails to check if the folder is called ‘UserCache’, which also definitely not a satellite folder.

Personally I think this is bad design in the first place, since:

  1. Satellite folders have a predictable naming convention
  2. Why check for what it is not rather than what it is?
  3. What happens if the developer decides to throw in another 5 folders? This would be an extra 5 exceptions being thrown… and nobody likes the computational cost of exceptions.

I really wish Microsoft would fix this… until then, we’re going to have to live with seeing a bunch of ‘System.Globalization.CultureNotFoundException’ on startup :(

Note: the System.Web.dll that I am checking is v4, and the one that comes with .NET Framework v4.5


Increase Virtual Machine Disk (vmdk) Performance On VMware


, , , ,

Here are some tips I found for speeding up the performance of a virtual disk, in my case I am using vmdk files on VMware Workstation

Follow the link ->