Upgrade Visual Studio 2013 solutions to Visual Studio 2015
The simplest solution IMO (also worked for 2012 and 2013) is:
- Open the solution file using Visual Studio 2015
- Select the solution file in Solution Explorer
- Select File / Save MySolution.sln As...
- Overwrite the existing solution file.
Change the version in the .sln file
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
To match whatever version you have
As of this morning my VS Enterprise is 14.0.23107.0
Example:
# Visual Studio 2015
VisualStudioVersion = 14.0.23107.0
Visual Studio 2015 Update 3 is 14.0.25420.1
Note: This works for VS 2015 and 2017
An alternative to hand-editing the .sln file or re-saving on top of the original .sln file:
- Open the solution in Visual Studio
- Right click solution > Add > New Solution Folder (name does not matter)
- Save solution
- Delete the newly added solution folder
- Save solution
The solution will now be upgraded.
I ran across this looking for the same thing. The accepted answer works, but I noticed some comments about not being batchable. I found an option for batching and I thought I'd share.
You can use the /upgrade
option in devenv.com
. This means it's batchable. For example, to recurse the current directory upgrading all .sln files (after backing them up), you could do this:
dir -Recurse -path ".\" *.sln | ForEach-object {
Copy-Item $_.FullName "$($_.DirectoryName)\$($_.Name.Remove($_.Name.Length - $_.Extension.Length)).vs2013$($_.Extension)";
& "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com" /upgrade $_.FullName
}
I solved the problem by this: Right click on solution, "Retarget solution".(vs2013)