For those who don’t have VS 2008 yet, I created the VS 2005 templates

mvc2005

You will get two kind of solution/project templates (the same you get for VS 2008)

aspmvc

The MVC framework uses anonymous types extensively (for instance when you add Routes and set Defaults values for the route segments). You can see I provided an MvcDefaults class in the template which contains common properties like controller, action and id. You can either use that approach or install support for C# 3.0 in VS 2005.

Download ASP.NET MVC Visual Studio 2005 Templates (VSI format)

Enjoy!

I’ve been playing with Visual Studio 2008 Beta 2 lately and found a little gem: offline support for source control. It does not do everything I would like (like ability to use the Source Control Explorer offline), but we get enough to work with a solution when there is no connection to TFS.

1. When you open a solution offline (no access to TFS) this dialog will pop up saying that the solution will be opened in offline mode. Click OK.

image001

2. Let’s say you need to change “styles.css”. You open it and when you are done you will try saving it. You will get this known dialog saying that the file is write-protected. This is because the source control client protects the file against changes outside the tool.
Click on Overwrite to save the changes

image002

3. Online again! Right click on the solution and press “Go Online

500x335.aspx

4. Visual Studio 2008 will check the solution for changes while you were offline and will show this dialog. Press Go Online so the changes are applied in the TFS.

image004

5. Notice how the styles.css file is checked out.

image005

6. Now you can go on with more changes and check in your code. Changes made offline/online will be commited to TFS

image006

Now there is no excuse if the TFS is down or you don’t have access to it :)