ailon's DevBlog: Development related stuff in my life

Using Symlinks to Ease Development with Visual Studio Express

11/21/2007 8:01:16 PM

As you probably know, since Visual Web Developer Express and Visual C# Express (or VB for that matter) are separate products and you can't create DLLs in VWD or build web sites in VCS it is painful to develop ASP .NET controls using the Express editions of Visual Studio.

There are several ways to workaround this limitation. Personally I prefer the one where you develop your control in App_Code directory of a test web site in VWD and then when you are ready you copy the .cs files to a project in Visual C# Express and build your DLL(s) from there.

vwd_spaw2

The problem with this approach is that you have 2 copies of your files and as it often happens sometimes you edit the files in one place then in the other dir and you have a mess.

Fortunately this problem can be solved using symbolic links - feature well known to *nix guys and now available in Windows Vista using mklink. As far as I understand you can get the same effect using linkd command in Windows Resource Kit for Windows 2000 and newer but mklink comes with Vista out of the box.

So, what I do is make a symbolic link in my Visual C# project directory which points to a subdirectory in my Visual Web Developer web site:

cmd_mklink

The syntax for mklink in our case is this:

mklink /D new_dir_path original_dir_path

Now we just need to include our newly created "fake" directory into Visual C# Express project and we are all set

vcs_spaw2

This approach can be used in many different scenarios. Currently I work on a couple of related web sites with a colleague. All of the sites originate from one "base" web site. The class files of this base web site are still under development (we update them from time to time). It's too early to compile them and include in our "inherited" web sites as DLLs, so we use the same technique to "include" these common files in our "child" projects.

kick it on DotNetKicks.com
Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Related posts

Comments

11/21/2007 8:09:28 PM

trackback

Trackback from DotNetKicks.com

Using Symlinks to Ease Development with Visual Studio Express

DotNetKicks.com

11/22/2007 11:12:33 AM

pingback

Pingback from blog.solmetra.com

Solmetra Developer Blog » Blog Archive » Using Symlinks to Ease Development with Visual Studio Express

blog.solmetra.com

12/12/2007 1:55:44 PM

Sally, web designer

Quitr curious approach. I've never worked this way but after your post, may be, I will examine it. I haven't understood some aspects, so could you give me more detailed information or just inform where I can find it?

Sally, web designer us

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

10/13/2008 10:59:48 AM

Copyright © 2003 - 2008 Alan Mendelevich
Powered by BlogEngine.NET 1.3.1.0