views:

61

answers:

4

I recently joined a team that is working on a ASP.NET MVC project.. they are all working on visual studio 2008 but i have VS 2010 on my machine... I am going to suggest we all upgrade to asp.net MVC 2 but my question is

Will they have to also upgrade to VS 2010 or will a simple install of MVC 2 be enough for all of us to work on the same project simultaneously? We are using VisualSVN if it makes a difference.

Edit: Just to clarify, I do know of the new additions to .Net 4 that wouldnt work on .Net 3.5 Like the Razor View Engine the : syntax for Html Encoding and some other things

I dont plan on using any of these features..

My question is more targetted at if I can continue using VS 2010 or I should just uninstall it and install VS 2008 to be able to work on this team.

A: 

Visual Studio 2010 will forcibly upgrade any VS2008 project it opens. I really wish they had fixed this, but they didn't. If it's of critical importance to you to work on the same project with both versions, then it's pretty easy to write a program to turn a VS2010 project back into a VS2008 project.

I couldn't tell you about ASP.NET MVC 2.

John Saunders
Well, what Im thinking is that maybe I should just commit some specific files (like controllers, models and views) and not snl or csproj files
NachoF
That works fine unless you make changes to the sln or csproj files in VS2008 and need those changes in VS2010, or vice versa.
John Saunders
A: 

The T4 version in VS2010 to generate views makes <%: %> while the one in VS2008 generates <%= %> as it doesn't know about that new syntactical meaning (and the implementations behind it as it's .NET 4.0 only).
Edit:New <%: %> Syntax for HTML Encoding Output in ASP.NET 4 (and ASP.NET MVC 2).

Also the solution file will be different so if they insert new files or projects or delete/update them you also have to do that again.

Sad but true but you either have to use VS2008 or they'll have to upgrade to VS2010. I suggest the latter scenario btw.

XIII
Does VS2010 really output <%: %>? I didn't know that. But if that is the case you could change the T4 template to output the old <%= %> syntax instead.
Jesper Palm
See my edit please. You can indeed change the T4 templates but really the <%: %> is safer as it's already encoded. Besides there's a new syntax based on the @ character: Razor.
XIII
+1  A: 

I think that you should be able to create a copy of your solution file, name it something like Solution-VS2008.sln and then open the original with VS2010 and let that copy be upgraded.

If you don't use any C# 4 features people with VS2008 should still be able to open the project with the Solution-VS2008.sln file.

Edit: Reading some of the other comments I get the feeling that this might not work.

Jesper Palm
A: 

You can install 2008 without uninstalling 2010. You can use ASP.NET MVC 2 in visual studio 2008, here are some good instructions on how to do the upgrade: http://www.asp.net/learn/whitepapers/aspnet-mvc2-upgrade-notes. Use the manual steps, it doesn't take too long.

Frank Schwieterman