some solution files still have the VS10 icon - visual-studio-2010

I have installed Visual Studio 2012 (aka 11) and uninstalled 2010. However I noticed that solution (.sln) files show an icon that has a little "10" on it while others have "11", with no seeming pattern. They are all solutions that I started out using in 2010 but have since worked on in 11. Why is this?
EDIT:
I noticed that I if I open the .sln file in a text editor, the "10" icon corresponds to:
Microsoft Visual Studio Solution File, Format Version 11.00
And the "11" icon corresponds to:
Microsoft Visual Studio Solution File, Format Version 12.00
Yes you read that right (!!!)
EDIT:
What if I change the .sln file in the text editor from 11.00 to 12.00? Is that recommended?

From what I've been able to figure out:
If you make any change inside Visual Studio that causes it to change the .sln file (i.e. adding a text file at the solution level, then deleting it, then doing "Save All"), the header of the .sln file will change to:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
and the icon will change to "11".
You can manually change the header if you want and the same thing will happen.
However, the icon and header really don't matter... you can leave it as is and everything will work fine because the file format is the same as VS2010.
I'm not sure what will happen if you change the headers to 12.00 as above and then try to open it in VS2010

Ignore the file format version number. It would have kept in sync with the VS version number, if it wasn't for VS2003, version 7.1. Essentially a major maintenance release for VS2002, the version that first introduced .NET support. So it's off-by-one right now.
The file format versions have increased with every VS release. That caused a lot of pain, when you worked in a team you'd have a pretty big headache if not all of the team members moved to the next version at the same time. Lots of questions about it at SO.
That changed in VS2012, it is the first version of VS that can read and write the solution and project files of the previous version. Which explains what you see, your VS2010 projects just never got converted, even after opening it in VS2012. Nice feature.

Related

Visual Studio 2013 tries to load localized afxres.rc from older version

We have recently upgraded an MFC solution from Visual Studio 2005 to Visual Studio 2013 (Update 4), at last. I think the solution originates in Visual Studio 6 and was upgraded to VS2003, then VS2005. It is a Multibyte (i.e. non Unicode) solution.
We haven't had many problems, so far. In fact it seemed like we had sorted pretty much everything out.
One of the errors we were getting was in the rc file, where the compiler said it couldn't find "l.esp\afxres.rc". Upon investigating the issue, we found that in VS2013 (I guess 2012 and 2010 too) the path is "l.esn\afxres.rc" so we changed it, and it all worked fine again.
Now, after "finishing" the port, we've continued the development, and we've found that, every time we make a change to the resources (add new controls, change the properties of existing ones) the path returns to the old one ("l.esp\afxres.rc"). It changes it when saving the resource file (make change, click save, it's already changed).
I guess there is some property, or something, that it's still telling the IDE it is a Visual Studio 2005 project, but I can't find it. I've tried removing the UpgradeFromVC71 property page, but to no avail.
Any ideas?
Ok, I've found it! Leaving an answer for future reference.
It's in the Resource include files. Go to Resource View, right click on the .rc file and select "Rsource Include Files". There are the offending includes. Change the path, and done!
https://support.microsoft.com/en-us/kb/198536 (old, but good enough)

Visual Studio Solution icons and file versions

This isn't an important question, but something that has been bothering me for awhile and my google-fu wasn't able to find an answer.
I know that Visual Studio 2013 is version 12 and Visual Studio 2012 is version 11.
Why did Microsoft make the icon for VS2013 solutions have 12 in it (their version number). And VS2012 solutions have 11 in it (again the version number)? VS2010 solutions correctly has 10 in the icon, even though the file format says its version 11.
Now this might just be on my machine(s) because I have multiple versions of VS installed (and editions), but it is just something that makes my head itch.
The numbers correspond to the internal version numbers of various editions of Visual Studio
Visual Studio 6.0 (1998)
Visual Studio .NET (2002) = version 7
Visual Studio .NET 2003 = version 7.1
Visual Studio 2005 = version 8
Visual Studio 2008 = version 9
Visual Studio 2010 = version 10
Visual Studio 2012 = version 11
Visual Studio 2013 = version 12
Visual Studio 2015 = version 14
The number on the icon indicates the version that the project or solution is compatible with.
this info is taken from :
Wikipedia_VS_Version history
Though the question is old, it is a general question on its own.
I was wandering to get a meaningful answer (because I wondered too) and get here only to find an incomplete one. Not satisfied and tried an editing trick on ".sln" file to get the answer.
At first, it is easy to find version numbering on Microsoft's own pages or wikipedia etc. Now the thing is having that number on "the sln file icon". That would be the answer to this question if I had asked it.
Open the sln file with a text editor as its content is mere text. Now the "format version" part on the first line is relevant to the content of the file, so not relevant to answer. The version number on the second line for VS version "# Visual Studio 15" is the thing what gives the file its icon. Changing the number and saving the file is immediate to change the number on the icon. Currently, 10,11,14 and 15 versions are supported it seems. By the way, if you have a line of "VisualStudioVersion", you need to delete it before saving to see the effect.
But be careful: even though you may change the icon, if the content format is not right, VS will complain about the solution. Don't forget to revert the changes back. And also this part gives a clue that you can write your own solution file in a text editor.
As to "why bother!!" of the question, an answer would be to recognize a solution version by look before opening it in the VS. You may have an older version of the file which possibly has incompatibilities in the project files inside, thus you can decide to do some adjustments by hand before opening it in your installed VS version.
PS: I once thought the "10" in the icon is "IO" for "input/output" terminology and wondered what "15" might be as I read it to be "IS". Found this Q/A, not satisfied and tried to improve. If you like, don't forget to give up vote.

Loading Visual Studio 12 project in Visual Studio 10 [duplicate]

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?
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...
If the VS2010 installation has SP1 installed, then it should be able to read the VS2012 solution file.
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.
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.

Export Visual Studio 2012 to 2010 sln format

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?
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...
If the VS2010 installation has SP1 installed, then it should be able to read the VS2012 solution file.
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.
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.

Pick which Visual Studio to open old .sln-s with Visual Studio's Version Selector

I have both Visual Studio 2008 and 2010 installed, side-by-side, and VSLauncher correctly opens 9.0 .sln-s with VS2008 and 10.0 .sln-s with VS2010.
However, whenever it encounters an older .sln (e.g. 8.0), VSLauncher automatically picks Visual Studio 2010.
For various reasons, I would like to choose which VS it should open to convert to, but it blindly opens VS2010. I see that there's RMB > Open With > Microsoft Visual Studio Version Selector, but this doesn't produce a list of installed VS-es that I'd anticipate, it simply launches VS2010.
Is there a way to get the configuration I'm looking for?
Background info:
They were installed in chronological release order
I'm running Windows 7 x64
Both VS-es are 32-bit
I think that the justification for this behavior is:
If you have an "older" project (say VS2005), then no matter which versino of VS you use to open the project, there is going to be a conversion process.
With that in mind, it makes sense to convert to the newest version available. Converting a VS2005 project to VS2010 isn't significantly harder than converting it to VS2008, but you'll have more capabilities once the conversion is complete.
Old versions of Microsoft products eventually don't get supported anymore... I think the policy is to fully support the last 2 versions, and then the previous version for 2 years (or is that 1 year). Not sure the date that VS2010 came out, but support for VS2005 will expire either 1 or 2 years after that... If you convert your VS2005 project to VS2008, you'll have the same pain all over again 1-2 years after the next version of VS comes out.
That said, the real answer to your question is: Get in the habit of opening .SLN files with Notepad, so that you can figure out what version it is. Then open up the correct version of VS and click on File/Open to open the project. It isn't as convenient as double-click, but once you get into the habit, it isn't all that bad.

Resources