How can I open a Visual Studio 2008 project in Visual Studio 2010 and leave it in the 2008 format?

Sometimes I do consulting work for companies that are still using Visual Studio 2008, but I have set 2010.

I suggested (yes, the assumption is the mother, father, brother and sister of all f-ups!) That I could open the 2008 projects in 2010 without updating them. However, it seems this is not so?

Unfortunately, the choice to compile for .NET 3.5 will not solve this problem, since the original developers will have to continue developing the same projects in 2008.

+4
source share
4 answers

You cannot leave the project in VS2008 format and there is no automatic way to reassign the VS2010 project to the VS2008 project.

There are several differences in the files:

<Project ToolsVersion="3.5" ... 

becomes:

 <Project ToolsVersion="4.0" ... 

<ProductVersion> changes from 9.0.30729 to 8.0.30703 (although I only use 2010 Express editions at the moment, so this may be different for the full version).

Alternatively, you can update the project on your computer and simply copy the source files. However, this will require more work if you added / deleted any project files, as this would have to be repeated on a machine with VS2008.

+5
source

Unfortunately, I do not think there is a backward compatibility option for VS2010.

What I did was upgrade the VS2008 project to 2010 and leave backup copies of the project files and solutions. Then I will rename all updated files to project_name_vs2010. * And rename the backup files back to the original name, since I'm the only developer using 2010. The downside is that any changes you make to a project or solution need to be redone inside VS2008 (or manually edit the XML if you don't have a copy of 2008) before you push your changes. The positive thing is that all source files will work in both versions thanks to VS2010 multi-targeting. You definitely need to set the compiler option to 3.5 in order to maintain compatibility of all source files.

+1
source

I faced the same problem from 2005 to 2008. If you are not using anything that is not supported in an earlier version, such as .Net 4, then all you need to do is revert the VS changes made to the .proj file to open it again in 2008. It is very annoying that you need to do it many times, but I think that this is basically your only option.

+1
source

You can not.

However, you may have several solutions (one for 2010, one for 2008), each of which refers to projects. Project files themselves should not be changed.

If you are following this route, you must make sure that the project objectives do not exceed .Net 3.5.

+1
source

Source: https://habr.com/ru/post/1315413/


All Articles