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.

No comments: