开发者

migrate a asp.net mvc solution file from 2010 back to 2008

开发者 https://www.devze.com 2022-12-09 13:45 出处:网络
i did an upgrade and it caused lots of problems. unfortunately i didn\'t back it up.Is there anyway i can convert a 2010 solution file back into asp.net 开发者_开发知识库mvc 2008?Make a backup of what

i did an upgrade and it caused lots of problems. unfortunately i didn't back it up. Is there anyway i can convert a 2010 solution file back into asp.net 开发者_开发知识库mvc 2008?


Make a backup of what's left of what you currently have before doing this ...

Create a new solution in Visual Studio 2008. Create new projects for the 2008 solution. Use the project menu or right-click the project and choose "Add Existing Items..." Choose all the code files .cs .vb, etc from your 2010 structure and include them in the 2008 structure.

Basically you're copying all the code back into a 2008 structure with the 2008 formatted project and solution files. The code shouldn't be substantially changed beyond repair. You might have to manually address some issues in the converted code but once you know what they are it will be a repetitive process more than anything.


If you are writing code of any importance you should be using a version control system like as SVN. I haven't tried Visual Studio 2010 yet, but can tell you from experience that the differences between 2005 and 2008 are laughably small. You can down convert a 2008 solution file by manually changing the first two lines from:

Microsoft Visual Studio Solution File, Format Version 10.00
Visual Studio 2008

to

Microsoft Visual Studio Solution File, Format Version 9.00
Visual Studio 2005

the project files are fairly trivial as well with the product tag changing from:

9.0.21022

to

8.0.50727

Please note the changes I have listed for project files may not be 100% accurate and I have not tested for differences between service pack releases. However, creating a new project in an earlier version of Visual studio, making a copy and then doing an upgrade should allow you to run a diff and provide a better answer than what is currently accepted.

0

精彩评论

暂无评论...
验证码 换一张
取 消