It’s never the runtime… (Except when it is)

BugSomething I’ve learned over the course of many years working in IT is that when you hit a difficult to explain problem it’s very easy to say “it’s the runtime’s fault!” or “that’s a compiler bug” to cover for the lack of explanation for your problem. The vast majority of the time, it’s not true though. It’s just a subtler bug in your own work that you can’t see yet.

Every so often, however, it is true. And it turns out the issue I discussed the other week about Sitecore rendering a Razor error when you asked for a media item may well be an example of this. Continue reading

Advertisements

Sitecore builds with Visual Studio Online – Part 2: Building code and running tests

Following on from last week’s “how to host private NuGet feeds in Visual Studio Online“, this week we’ll build on that to get some code to compile and some Sitecore.FakeDB tests to run and Hedgehog TDS to generate a deployment package in the cloud build. Continue reading

Config variables in PowerShell DSC can confuse

I’m in the middle of preparing a talk for an upcoming Sitecore user group on the subject of using PowerShell DSC for Sitecore installs. (I’ll post a write up of the talk after I’ve given it) And one of the things I’ve discovered is that once you get into the guts of it, using configuration variables alongside Script Resources can be a bit confusing.

So, for the benefit of my future self (I’m bound to forget this as I am taking time off from my preparation to head over to the US for this and this) I’m writing down what I’ve worked out… Continue reading

More Windows 10 Fun: Installing VirtualBox

Having upgraded my computer to Windows 10, I found myself unable to install updates to VirtualBox. After downloading the 4.3.40 (build 101610) release, clicking the installer immediately gave the error:

Failed to create extraction path 'C:\Users\jeremy\AppData\Local\Temp\VirtualBox': VERR_ALREADY_EXISTS

Googling this message gave two themes: First was “you cannot upgrade the VirtualBox Guest Extensions while you have a VM in the ‘saved’ state” (a common theme on the VirtualBox forums) and then separately some source code which raised the error when it couldn’t create a temporary directory. But it didn’t give me pointers to any useful fixes.

Having tried various approaches including trying to install VirtualBox 5 instead, uninstalling VirtualBox 4 before running the 4 and 5 installers, and Windows Compatibility settings, I finally hit upon this solution:

Open a command prompt, and change directory to the location where you have downloaded the VirtualBox installer. Then run:

VirtualBox-4.3.40-101610-Win.exe --path .\tmp --extract

(Use the correct .exe file name for the version you have downloaded)

This will extract the MSI installer files to a directory called “tmp”. Then run the MSI from this folder.

Having done that, the installer completes OK.

Updated to add: In the comments, Chaomai pointed out another solution to this problem. Having now had a chance to test it, I can confirm his approach works for me as well.

If you see the error below, his suggestion is to look in the current user’s AppData/Temp folder. (which is accessible via the %TEMP% environment variable on most machines) Here you will find a file called VirtualBox with no extension:

VirtualBox File

Delete this file, and re-running the installer will succeed. Cheers Chaomai.

Scripted DMS Installs

Continuing my current theme of installation automation via PowerShell, the next task I found myself looking at was how to enable Sitecore’s analytics for a newly installed Sitecore instance. This is a task that the standard .exe installer doesn’t do for the v6.6 sites I’m working with, but is relatively simple to automate. Continue reading