5

This is similar to How to force a Solution file (SLN) to be opened in Visual Studio 2013? but not the same. I have a bunch of .sln files associated with Visual Studio Version Selector. However, they all contain # Visual Studio 2012 but I would like them to open in Visual Studio 2013 instead. I can open the solution files with the /upgrade flag as per this link. However, it simply says

This project/solution does not require migration. It will open without modification.

and doesn't change the files, therefore they still open in VS2012. You can explicitly open the solution in Visual Studio 2013 and do a Save As, but this is a very manual process and I have hundreds of solutions. Surely there is a better way than a find/replace in files?

Community
  • 1
  • 1
Craig W
  • 4,390
  • 5
  • 33
  • 51
  • 1
    I haven't found a solution other than doing a find/replace in files with UltraEdit or Notepad++. However, it amazes me that there isn't an easier, more robust way. – Craig W Dec 27 '13 at 22:46

2 Answers2

0

You must right click on solution file - > open with - > Choose default program and then choose visual studio 2013 and mark checkbox "Use this app for all .sln files"

Radenko Zec
  • 7,659
  • 6
  • 35
  • 39
  • 3
    I was aware of this approach and it works, but the solution files still specify Visual Studio 2012, which doesn't seem ideal. – Craig W Dec 27 '13 at 22:52
0

I haven't tried this yet but... using the command in the format devenv "MyProject.sln" /upgrade you could recurse all the folders and upgrade all the .sln, .csproj etc files. I got the devenv ... /upgrade from https://stackoverflow.com/a/27625352/492

Community
  • 1
  • 1
CAD bloke
  • 8,578
  • 7
  • 65
  • 114