Thursday, March 20, 2008

Heroes Happen {Here} in Edmonton

Last week I went to the Heroes Happen {Here} event in the Scotiabank Theatre. This event was for the launch of Windows Server 2008, Microsoft SQL Server 2008, and Microsoft Visual Studio 2008. It was presented by John Bristowe, a Developer Advisor with Microsoft Canada. The presentations were really good and we also received evaluation copies of the products above. I am glad to see this kind of events around here and looking forward for new ones.

The presentations can be found at

And there is also the Canadian Developers' Blog.

Sunday, March 16, 2008

Migrating to Visual Studio 2008 and WCSF February 2008

We recently migrated from Visual Studio 2005 to Visual Studio 2008. We are currently working on a Web project and using the Web Client Software Factory (WCSF) which just released a new version (WCSF February 2008) supporting the new version of Visual Studio.

For migrating our existing projects, we followed the instructions from the WCSF site:
On this post, I would like to discuss a few issues we faced during this migration and the solutions we used to solve the problems.

Cannot create new project, class, or page on Visual Studio 2008: "Could not load file or assembly 'Microsoft.VisualStudio.TemplateWizardInterface, Version="

We were having
the error "Could not load file or assembly 'Microsoft.VisualStudio.TemplateWizardInterface, Version=" when trying to create new project, class, or file on machines with previous installations of GAX/GAT.

For some reason, previous installations of GAX were adding some assembly redirects into devenv.exe.config. This redirect is not needed for Visual Studio 2008 final release, and if it is present it does not allow you to create new projects, new classes, pages, etc. My guess is that uninstalling previous versions will not remove this redirect entry. We didn't have this problem when installing the latest GAX/GAT/WCSF on clean machines.

So, the solution we used was to remove this redirect from devenv.exe.config.

1. Open C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe.config in a text editor

2. Find this string: "Microsoft.VisualStudio.TemplateWizardInterface"

3. Comment out the element so it looks like this:

<!-- <assemblyIdentity
culture="neutral" /> -->
<bindingRedirect oldVersion=""
newVersion="" />

Cannot preview aspx pages in the Visual Studio designer

If your current aspx pages, or master page(s), contain the title tag as <title/>, then you will get an error when switching from the source view to the design view.

The page has one or more <asp;Content> controls that do not correspond with <asp:ContentPlaceHolder> controls in the Master Page.

To fix this, simply change your aspx pages, or master page(s), to use <title></title> instead.

Performance Issues When Editing ASPX/HTML pages in the Source Code Window

I noticed some lack of responsiveness when editing an aspx page on the source code window. When typing code, everything freezes and it takes a while for the intellisense to respond. Luckily, I found this post explaining the problems and pointing to a hot fix. I strongly recommend you to install this hot fix:
Using Enterprise Library 3.1 with Visual Studio 2008

The Enterprise Library 3.1 only works with Visual Studio 2005, and version 4.0 will support VS2008, but it has not being released yet. In the meanwhile, if you need use EntLib 3.1 with VS2008, then the following link provides details of how to do it:

After fixing the issues above, everything is working fine so far.

Friday, March 07, 2008

Installing VMware Player on Ubuntu 7.10 (64-bit) to Run Multiple Development Environments

My current laptop has Windows Vista Ultimate (32-bit), but I want to install Ubuntu 64-bit to be the host operating system and use VMware to run multiple virtual machines with different software development environments (Vista + Visual Studio 2008, XP + Visual Studio 2005, Ubuntu + Eclipse + LAMP, etc.). Instead of installing all different environments into the same OS, I prefer to have a dedicated virtual machine for each.

The idea is changing from a single boot Windows Vista to a dual boot Ubuntu 64-bit and Windows Vista. In Ubuntu 64-bit, I will run all virtual machines for software development. The original Windows Vista will be preserved in case I need to run a Windows application without using virtualization.

Installing Ubuntu

The first step is to install Ubuntu 7.10 (64 bits) on my laptop. Since I decided to leave my existing Windows Vista partition (drive C:) and my NTFS data partition (drive D:), I shrink my NTFS data partition in order to get some free space at the end for the Ubuntu installation. The following guide describes the whole process:

Sharing data between Ubuntu and Windows Vista with Read/Write Permissions

I want to share data between my Ubuntu and Windows Vista with read and write permissions. We have two options for it: setup read/write support for NTFS partitions on Ubuntu or setup read/write support for ext3 partitions on Windows Vista.

To setup read/write support for NTFS partitions in Ubuntu, use the following guide:If you prefer to setup read/write support for ext3 partitions in Windows Vista, then you will need to use an ext3 driver for Windows. The following driver also works for ext3 partitions:

Installing VMware Player in Ubuntu

I will be using VMware player in my laptop. I use VMware Server on my desktop where I create my the virtual machines. On my laptop, I decided to only install the VMWare Player since I just need to run the virtual machines. WMWare Player has less features than the VMWare Server, but it runs faster.

The steps for installing VMware Player on Ubuntu 7.10 (64-bit) are:

1. Install the Linux header files for your kernel version. In my case, I just run:
sudo apt-get install linux-headers-$(uname -r)-generic
2. Download the VMware Player 64-bit (tar file) from Or you can just run the command:
3. Extract the files to a local directory:
tar -xzvf VMware-player-2.0.2-59824.x86_64.tar.gz
4. Enter in the directory and run the installation script:
cd vmware-player-distrib
sudo ./
5. During the installation, I chose the default options by pressing ENTER. Note that when it asks the location of the kernel header files, you should provide the location where it was installed on step 1. In my case, they are in:
6. IMPORTANT: Since I am using a 64-bit version of Ubuntu, I also needed to install 32-bit libraries so that we can also run 32-bit virtual machines. If you do not install these libraries, you will get an "Cannot power on" error message when trying to run a 32-bit virtual machine. So, install the 32-bit libraries by running:
sudo apt-get install ia32-libs
Now you are all set. To start the VMware Player, just go to the main menu and click on Applications, System Tools, and then on VMware Player.

The Trade-offs of using Virtual Machines for Software Development

The drawback of running your software development environment on a virtual machine is that you do not have the same performance as running it on the host OS. The benefit is that it gives you much more flexibility. For example, you can have dedicated environment for specific applications your are developing, you can easily move your development environment from one computer to another, you can backup the whole development environment by just copying the virtual machine files to an external drive, etc.

Another advantage is using a 64-bit OS as host, which recognizes all the RAM you have. Windows Vista 32-bit might not be able to recognize 4 GBytes of RAM. My desktop has 4 GBytes, but Vista only sees 3 Gbytes.

Although there is a little bit of performance loss, I still prefer using development environments in virtual machines for the flexibility that it gives me.

Spring Boot Configuration Properties Localization

Spring Boot allows to externalize application configuration by using properties files or YAML files. Spring Profiles  provide a way to segr...