having trouble opening solution in source safe - visual-studio

I am trying to open a solution file in source safe 6.0d in Visual Studio 2005 (no service packs installed) and I get the Conversion Wizard saying it was created in a previous version.
So I try to open it up in 2003 sp1 and it says it was created with a newer version of visual studio?
Is there a way to tell what version of Visual Studio is in Source Safe?
Any ideas?

Look in the .sln file. Starting with VS2005, the second line has an identifying tag, such as '# Visual Studio 2005'
Each project file also has a 'ProductVersion' attribute. My guess would be that some projects within the solution have already been converted to a newer version.

Related

Open visual studio project in its respective version instead of Visual Studio 2017

Ever since I installed Visual Studio 2017, it now wants to be the one to open all of my projects. Before installing 2017, if I double clicked a VS 2010 .csproj or .sln in Explorer (Windows 10), it would open in VS 2010. But now opening a project for all previous versions opens in 2017. Even if I right-click and choose Open With > Microsoft Visual Studio Version Selector it always chooses 2017. To open it in the correct version of Visual Studio, I have to first open VS and then browse to the project to open. This is a pain when I don't remember which version the project should open with and just want to click it and open it. Can I reset it to open a project in the version of visual studio it belongs with?
I confirmed how this is meant to work with the team. The only requirement is that you set Microsoft Visual Studio Version Selector as the Default App for .SLN files in Windows. That app launches the version of Visual Studio specified in the solution file. If you crack open a .sln file in an editor, you'll see a section that specifies the version of VS that should be used. It'll look something like this:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.25909.2
One thing to keep in mind though is that value will change whenever a different version of Visual Studio writes to the solution file. E.g., if you create a solution in VS 2010, close VS 2010, launch VS 2017, open the same solution, add a project to it (this is what forces VS to make a change to the .sln file), the version in the solution file will then change to VS 2017. I.e., the last version of VS to write to the solution file, will be set as the version to be used when opening it.
If you're finding it's not working as described, we likely have a bug here. Let me know if that's what you think is happening.

Visual Studio 2010 is unable to open project

I used Visual Studio 2010 to develop a web application. I formatted my machine and installed Visual Studio 2010 Professional. When I try to open old projects, I get an error saying:
The selected file is a solution file, but was created by a newer version of this application and cannot be opened.
I do not remember the version of visual studio 2010 I used the first time.
Can anyone tell me which version came after the professional edition?
Make sure VS2010 is updated to the latest service pack, otherwise check to see if the project was actually made in VS2012/13 in which case you will need to create a new VS2010 solution and rebuild it from your existing projects.
Open the .sln file in a text editor. In the beginning there is a marker which tells the VS version it is meant for. For VS 2010 it should look like that:
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
You should be able to change these values without any problems. As far as I know the file format did not change.
EDIT
Considering the comment of Dumisani: of course you need to target .net 4.0 and make sure no features of .net 4.5 are used!
Chances are you had a service pack installed that you are missing with a clean installation.

Convert solution to the latest version

I am practicing Microsoft net framework training kit. The problem is that the solution/projects were made by Visual Studio 2008. I use Visual Studio 2012.
The projects are unavailable.
I want to modify the solution file and project files. Just worry about messing up them.
Another snapshot:
How to modify them by editor then I can load them with visual studio 2012?
Visual Studio should do update the projects and solutions for you. In my experience, it only shows unavailable when the project is located in a different location than where the solution file is looking for it. Perhaps you recently changed the name or copied only some of the files?
At the very least you should be able to remove the unavailable projects and re-add the original projects. They'll be converted as they're added.
Convert it to 2010 first, then convert it to 2012. It is the particular case. It could be the project was written in 2008 but faied in 2012.

Are Visual Studio 2008 and Visual Studio 2012 solutions"compatible"?

I edited my project (which was written in school using Visual Studio 2008) at home using Visual Studio 2010 Express. When I got back to school, I couldn't open my solution anymore as Visual Studio 2008 told me that the file was created with a newer version of Visual Studio. I asked my professor for help and he edited something in the assembly information of the solution and voila, I could open, run, edit it again as nothing ever happened.
However, I forgot what he did with the assembly information. Does anyone here know what he could have done? or is this approach not advisable?
At the top of the .sln file there would be a line:
Microsoft Visual Studio Solution File, Format Version 11.00
If you change the version to 10.00, it would correspond to Visual Studio 2008. Use any text editor for this.
The file format has not changed in between these versions (nor has it for Visual Studio 2012).
Edit the .sln file in Notepad and find the version number (11.0) on the first or second line. Change it to 10.0, save the file, and you should be good to go.

Visual Studio 2010 and 2008 mixed development environment possible?

We are looking at migrating to Visual Studio 2010. Is it possible for some developers to use Visual Studio 2010 and other to use 2008 on the same solution/projects? How will it affect our VSTF builds (VSTF Server 2008)?
You only need to have a separate solution file for each version of Visual Studio for this to work. Project files will work on both VS2008 and VS2010 once converted.
What you need to do is to make a copy of your original VS2008 solution file. I find it easiest to give the copy a name that ends in _VS2008.sln to show that this is for VS2008. Once you have your xxx_VS2008.sln file tucked away next to your original sln-file you can open the original and have it converted to VS2010. When done you can rename the converted file to end with _VS2010 so anyone still working in VS2008 won't open it from their recent projects in Visual Studio and wonder what is going on.
We did this when we went from 2005 to 2008 and we are doing the same now when we are going from 2008 to 2010. Worked fine the first time and so far it has been working for VS2010 for almost a week now without any of our developers reporting problems with it.
once project converted by vs2010 it connot be just opened in vs2008 because vs2010 changes tool version in solution/project files. So you need to maintain two versions of solution/project files.
You will need to have separate solution/project files for 2008 and 2010 as these have different formats - hence the conversion wizard - but you will be able to share other source code files from a common location. Also, bear in mind that you will also have to restrict your target framework to 3.5 or lower to accommodate VS2008.

Resources