views:

51

answers:

3

What happens if I compile and deploy solutions written in vs 2005 using 2010?

Must the web server have 3.5 and 4.0 installed? Will my web.configs change?

I'm talking mostly about standalone DLLs used in SharePoint and Web application solutions that use .net 2.0.

Can I have vs2010 and vs2005 on the same development client? Is there a compatibilty compile mode back to 2005? how about vs 2008?

+1  A: 

What happens if I compile and deploy solutions written in vs 2005 using 2010?

When you try to open the project with VS2010 it will prompt you with a conversion wizard. You need to go through that to convert your project files to VS2010.

Once your project is converted, assuming it builds fine you can set the targeted minimum .NET framework version to have.

If you target .NET 2.0 you only need 2.0 deployed where you distribute your code but you can also have only any version after that and it will work fine.

To change your .NET version in VS2010 you simply need to:

Right click on a project -> Properties -> Application Tab -> Target framework drop down -> select something


Can I have vs2010 and vs2005 on the same development client? Is there a compatibilty compile mode back to 2005? how about vs 2008?

Yes you can have VS2005, VS2008 and VS2010 all installed on the same machine, I do for example and I have projects in each that still compile and work fine. It's supported.

Each individual solution though should only be used from a single VS version.

Brian R. Bondy
Awesome. and if I compile for 4.0 target, my web servers must have 3.5 and 4.0 installed right? but I noticed in IIS, you just specify 2.0 on the website. Thank you.
cyberpine
@cyberpine: You must have only 4.0 installed if you target 4.0 it includes the previous.
Brian R. Bondy
A: 

It's important to seperate out the VS version from the .NET version.

You can upgrade your 2005 (.NET 2.0) projects to VS 2010 and keep them targeting .NET 2.0. In this scenario nothing about the compiled program changes--just the tool you use to maintain it. Once you upgrade the Solution\Project to 2010 then you will no longer be able to open them in 2005.

If, however, you want to start using .NET 3.5 or 4.0 features then you'll need to target that framework in the Project's properties--and doing so will make the targetting framework a prerequisite for installation.

STW
A: 

What happens if I compile and deploy solutions written in vs 2005 using 2010?

First the solution has to be converted to VS 2010 format. This generally only updates solution files, project files, and the web.config file.

Must the web server have 3.5 and 4.0 installed?

No. You can still target framework 2.0.

Will my web.configs change?

Yes, and no. There will be some additions that's used in newer versions of IIS, but the previous settings should be unchanged.

Can I have vs2010 and vs2005 on the same development client?

Yes, they run side by side without problem. You can even have both running at the same time.

Is there a compatibilty compile mode back to 2005?

Once the solution is converted to VS 2010 format, it's not compatible with VS 2005 format any more.

how about vs 2008?

Same there. The conversion is one way.

You could still do the conversion back by hand, by simply creating a new 2005/2008 solution and drop the individual files into it.

Guffa