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=2.2.0.0…

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? ..you 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 -> http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008885

Send web page to device using Google Chrome


(Note: This post applies to Google Chrome.  Similar alternatives exist for FireFox)

I’ve often been browsing the web and came across a site that needed to be loaded on one of my devices (such as to download an app).

Copying the URL can be cumbersome, so I needed a solution for this annoying task.

Solution 1

The first solution I had come across, and have been using, is a QR Code Generator for Google Chrome… which can be found here -> http://tinyurl.com/ou7nq5d

The way this works, is that on any page you would generate a QR code for the current page, and then just use a QR Code scanner to scan the URL to your phone.

Step 1: Right-Click, and select ‘Generate QR Code’

Generate a QR Code
Generate a QR Code

Step 2: Scan the generated QR Code with your phone… and voilà :)

Scan the generated QR Code
Scan the generated QR Code

This solution is a bit cumbersome, but less cumbersome than actually copying the URL to your phone (or emailing/texting/gtalking it to your phone).

Solution 2

The second solution I found is even better!  This works similarly to the ‘other devices’ option in chrome, but with far less clicks.

Install the chrome to mobile plugin -> http://tinyurl.com/crkw3vx

Once this is done, a nice little icon will appear in your address bar.

Chrome to Mobile
Chrome to Mobile

This will show a pop-up with all your devices that are connected to your google account.

Send to device
Send to device

Once you do this, a push-notification (for iOS only, Android just goes straight to the page) is sent to your device (the device must have chrome installed)… select this, and bingo… you’re now browsing the page on your device.

iPhone Notification
iPhone Notification
iPad Notification
iPad Notification

Note: This will not work for Windows Phone (since there is no Chrome browser at the time of writing)… but the QR Code solution will work ;)

“Windows Program Compatibility mode is on. Turn it off and then try Setup again.” – How to uninstall an app if this happens.


I tried uninstalling an application (in my case, I was uninstalling Visual Studio 2012 RC), and I kept getting this error.

Following the logs and the help file got me nowhere, and neither did searching all over the internet for instructions on how to uninstall this using a tool or the registry or whatever.

Disabling the program compatibility service also does not work.

It turns out that setup.exe was marked to run in Compatibility Mode, which is what was stopping me from uninstalling.

So my mission was now to find where the uninstall package actually is on my hard drive and to check what the compatibility settings are.

This is simple: (instructions are for uninstalling on Windows 8)

  1. Run the uninstaller until it fails
  2. Go to task manager
  3. Call up the context menu for the installer process (right-click)
  4. Select ‘open file location’
  5. This will open the package folder
  6. Call up the context menu for the uninstaller executable
  7. Select the ‘compatibility’ tab
  8. Disable all compatibility settings over here
  9. ~the end~

I hope this helps someone!