Visual Studio 2015 installation "hangs"

Software: Visual Studio 2015 Enterprise

Feature: Windows Phone 8/8.1 Tools

Symptom: While installing Visual Studio 2015 with Windows Phone 8/8.1 tools option checked, the setup program will be stuck at "Visual Studio preparation" or "Installing Windows Phone 8/8.1 SDK" screen for hours with no sign of completion. Cancelling the setup at that point will goes back to another infinite wait.

Findings: Using Process Monitor, it seemed that the setup program was searching for a trn file in specific folders:



Although it's not throwing any error, the setup program was just running in infinite cycles. Probably someone forgot to set the max retry there. To fix that, I created an empty file called "a.trn" in the 2 folders above, and voila, the setup program suddenly can write logs to the folder, and complete the setup.

28. December 2015
Technology (0)

Configure a custom domain name in Azure App Service via A Record

To point your custom web domain name (in my case, to Azure websites (Web Apps) using A record, there are a few steps that you'll need to follow precisely, both from your domain registrar (in my case, and within the Azure Portal itself. This article describes the steps clearly:

However, one thing rather confusing over here, is that the configuration didn't work exactly as it described. I'm using to continue where the article left off, for illustration purpose:

HostRecord TypeIP Address or URLBehavior
@A (address) for browsing the site via ""
wwwCNAME (alias)contoso.azurewebsites.netbrowsing the site via "" will actually display "Error 404 - Web app not found." error from Microsoft Azure
awverifyCNAME (alias)awverify.contoso.azurewebsites.netThis is the additional requirement from Azure Web Apps, as explained in the original article. 
To make the "" actually points to a working Web Apps site, we'll actually need to add another CNAME alias, as follows:

HostRecord TypeIP Address or URL
awverify.wwwCNAME (alias)
Then go back to the Azure Portal > {your web app} > Settings > Custom domains and SSL > Bring External Domains > Add "" under Domain names. You should now notice 2 host names assigned to your site in the "Custom domains and SSL" tab: "" and "".

23. December 2015
Technology (0)

Moles Framework error: Missing Assembly Reference

Tool: Microsoft Moles Framework for Visual Studio 2010


If your machine has higher .Net framework installed (eg, 4.5) while your project is built targetting lower .Net framework (eg, 3.5), Moles framework will throw this kind of error when generating the Mole assembly:

The type or namespace name 'AntiXssEncoder' does not exist in the namespace 'System.Web.Security.AntiXss' (are you missing an assembly reference?)

Resolution: Manually edit the “.moles” file to remove reference to higher version classes that doesn’t exist in the lower .Net framework.


But, how exactly do we know which namespaces to be excluded? Easiest is to just run the build on the test project, look at the (huge) list of the error description similar to the above. It tells you exactly which namespace that is missing. Now, you just need to be creative to convert the error list from Visual Studio into the xml nodes in the .moles file. My personal favorite is copy to Excel, use Text to Column feature (delimited, single quote), then unique filter the namespace values, use concatenate function to construct the required elements, copy to .moles file.

Just in case, remember to eyeball check the resulting .moles nodes to see if there is anything not supposed to be there. After all, the Visual Studio error window may throw different errors.

19. November 2013
Technology (0)