Wednesday, December 27, 2006

Issue with opening VS.Net web projects.

Recently, I encountered an error message when attempting to open a web project in Visual Studio 2003. The message stated "Refreshing the project failed. Unable to retrieve folder information from the server." This is a generic message.

In my situation, this was caused by a combination of using Subversion and TortoiseSVN as my source control.

Within the help files I found the following solution to this issue.

"Use "_svn" instead of ".svn" directories
VS.NET when used with web projects can't handle the .svn folders that Subversion uses to store its internal information. This is not a bug in Subversion. The bug is in VS.NET and the frontpage extensions it uses. Read Section 5.26.7, “Subversion Working Folders” to find out more about this issue.
If you want to change the behaviour of Subversion and TortoiseSVN, you can use this checkbox to set the environment variable which controls this.
You should note that changing this option will not automatically convert existing working copies to use the new admin directory. You will have to do that yourself using a script (See our FAQ) or simply check out a fresh working copy."

The checkbox they are referring to is within the "Settings" dialog. This can be located from the Tortoise's context menu (usually accessible by right clicking on the directory of your project). You can find the checkbox within the General section.

In section 5.26.7 it goes on to say...

"5.26.7. Subversion Working Folders
VS.NET when used with web projects can't handle the .svn folders that Subversion uses to store its internal information. This is not a bug in Subversion. The bug is in VS.NET and the frontpage extensions it uses.
As of Version 1.3.0 of Subversion and TortoiseSVN, you can set the environment variable SVN_ASP_DOT_NET_HACK. If that variable is set, then Subversion will use _svn folders instead of .svn folders. You must restart your shell for that env variable to take effect. Normally that means rebooting your PC. To make this easier, you can now do this from the general settings page using a simple checkbox - refer to Section 5.26.1, “General Settings”.

One thing to keep in mind is that making this setting change is a general (global) change and will impact other existing working folders. You may find that when you try to perform an "Update", Tortoise will give you a "Skipped" message. What this means is that you will have to perform the steps of this solution for every working directory, eventhough those directories don't contain any web projects.

I haven't tried to duplicate this on VS.Net 2005 yet, but will post my results of that as soon as I do.

Sunday, December 24, 2006

Resharper Holiday Special

I'm a bit excited to now own my very own personal license of Resharper. This is a great addition to the Visual Studio IDE for developers, which provides nice features to increase productivity.

Enough with the hype. The main reason for this post is to highlight the special Resharper has for this year. Its not that easy to find this page through they're site so I thought I'd share this. This is a limited offer and for just under $100 it's worth it. It currently runs for about $149.

Sunday, December 17, 2006

Cropper anyone?

If you haven't heard by now, Cropper (by Brian Scott) is one of the best (free) screen capturing tools out there written in C#. Simply download it and use it to replace the old ALT+Print Screen function. Yes, there are other tools that do this, but for those developers out there, you can even download the src code to work on adding your own plug ins (i.e. Jon Galloway's animated gif pluggin).