问题
My teacher is complaining that he can't read the VS2012 format on his VS2010 environment. I looked around in settings and so on but couldn't find anything. How can I give the project in an VS2010 readable format to my teacher?
回答1:
Assuming this is not a terribly complex project (I'm making that assumption since there is a teacher involved), the easiest approach may be just to re-create the project in Visual Studio 2010.
Fire up VS2010, add your files, make any necessary changes to settings, and save.
You will need VS2010 no matter what approach you take. Even if you convert the project file by other means, it would be very wise to test it before handing it in again. The Express edition is free.
回答2:
Modifying sln manually
- Backup your project folder (copy/paste to another location, like a folder called "backups")
- Open sln file on wordpad
Change the "header" of opened sln to below (the first lines that matches mentioned lines below, except by version number/name):
Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010
I'll see if there is a way to do it in project options...
回答3:
If the VS2010 installation has SP1 installed, then it should be able to read the VS2012 solution file.
回答4:
Another easy way to do it is to right click on the source code, open it with a program such as notepad, then save that on to a USB stick. When you go to class, copy and paste this into Visual Studio 2010 and viola.
来源:https://stackoverflow.com/questions/12356855/export-visual-studio-2012-to-2010-sln-format