We started using VS 2010 and were very happy with it, so we converted our project into a 2010 solution (still .net 3.5) and continued our development in 2010. However, we are getting a lot of bugs recently and want to go back to 2008. The solution files have changed (new projects and files added everywhere), but everything is still in .net 3.5. I was wondering if there is an easy way to migrate back to 2008.
Depending on if they kept the solution file structure similar between 2008 and 2010, you just need to create an empty solution file in 2008 and look at the top identifier line in it, and copy it into the other solution file.
I however doubt they kept it the same since they were integrating a number of features into solution files.
You would be better off to create a new blank solution in 2008 and use "Add existing project" to reimport them. As long as you dont have any custom "solution" wide references this will work (no solution folders, server setups, etc).
It is probably the fastest and most direct route.
I had success changing the first 2 lines from:
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
to
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Assuming that your solution is under source control and the migration from VS 2008 to VS 2010 was the only change in that checkin, just compare the two version and see what's changed.
Then change the lines affected back to the VS 2008 version and you should be good to go.
There's no automatic process as Microsoft see this as a one way operation.
You can manually edit .sln file in text editor. There is field named version, or like that, just change it from 10 to 9.
This question
How does one convert a Visual Studio .NET 2008 solution to Visual Studio .NET 2005?
might also be applicable for converting from 2010 back to 2008.
You can use "Project Converter":
http://www.emmet-gray.com/Articles/ProjectConverter.htm
I have just found it. I am going to test it right now! :-)
Please try the following (find first line and replace to second line to convert 2010 solution to 2008):
TargetFrameworkMoniker = ".NETFramework,Version=v2.0"
TargetFramework = "3.5"
# Visual Studio 10
# Visual Studio 2008
Microsoft Visual Studio Solution File, Format Version 11.00
Microsoft Visual Studio Solution File, Format Version 10.00
<Project ToolsVersion="4.0"
<Project ToolsVersion="3.5"
<ProductVersion>10.0.20506</ProductVersion>
<ProductVersion>9.0.30729</ProductVersion>
\VisualStudio\v10.0\
\VisualStudio\v9.0\
<Import Project="$(MSBuildToolsPath)\Workflow.Targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets" />
This worked on my solutions, you can try to see if it fit to your cases.
as maZZoo tells, you have to replace those lines in .sln, but if you check you Output panel you may have an alert of using ToolsVersion="4.0", you have to replace that in the .csproj to:
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Related
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.
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.
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.
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.
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.