Over a million developers have joined DZone.

Add a Language to Windows Azure Visual Studio VM

· Cloud Zone

Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.

I was recently made aware that some unit tests for Kentor.AuthServices were failing on non-English computers. To be able to test a different setup I turned to Azure and set up a machine with VS2013 Pro and installed Swedish language support. Once I found the right way, it was very straight forward.

The problem was that I had set up a number of unit tests to check the actual contents of the exception message. Those are customized when running on a different UI culture (if the language is installed).

Just checking the type of the exception would not be enough as some methods throw ArgumentNullException for different parameters and I want to make sure that it is the right param that is detected and not a false positive. Following the TDD practices as strictly as possible on this project I had to get failing tests first, before making any changes.

I also wanted to make sure that it’s possible to develop and run all tests on VS Pro (I’m using Premium myself). It’s easy to accidentally use a tool that is not available in Pro and this was a perfect opportunity to check that.

So I headed over to manage.windowsazure.com to get started.

Finding the Visual Studio VMs

Create Azure VMThere are virtual machines available on Azure with Visual Studio preconfigured if you have an active MSDN subscription. First follow the normal link to create a new VM, but select the gallery instead of quick create. Create Azure VM from Gallery

To access the Visual Studio VMs, select the small MSDN check box down to the left. Choose the Visual Studio version you want and go ahead.

The provisioning (creation) of the machine takes some time, but once it’s created and running it’s available through remote desktop by default. The rdp settings file needed is available for download from the Azure portal. If you want to adjust the settings, such as adding access to the client’s drives you have to download the file and edit if. If you’re fine with accessing it through the default settings it’s easiest to just run the file directly.
2014-02-08 12_59_29-Virtual machines - Windows Azure

Adding a language

Azure VM Add LanguageAt first I had troubles finding the right way to add a language to the VM, but once I found the right way it was dead simple. Open the control panel and select “Add a language”. Find the language you want to add and add it. Now it is available for selection as input locale etc, but the translation files needed to get exception messages in the language are not automatically downloaded. That can be done by selecting the “options” link.
Azure VM Add language
Install Language Pack
Select “Download and Install Language Pack” to continue. Then a lot of patience is required. The download was quite quick, but the install was painfully slow. I aborted it several times because I saw no progress and thought there was en error. The progress bar only has two steps. Half complete and complete. It took nearly ten minutes for it to get to half complete and even more to finish, but once that was done, the language files were available and I could run my tests using a Swedish locale. I’ll get back to the solution for that in a another post.


The Cloud Zone is brought to you in partnership with Internap. Read Bare-Metal Cloud 101 to learn about bare-metal cloud and how it has emerged as a way to complement virtualized services.


Published at DZone with permission of Anders Abel, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}