I have many visual studio projects that are delivered to the client using the installer. After installation, all project files and solutions must have the latest installed visual studio version. Is there a way to convert many projects quickly ?
I tried the following:
1) parsing files and replacing various properties such as ToolsVersion , etc. It is fast but not reliable and needs to be changed for every new Visual Studio that enters the market (annually with AFAIK)
2) Using the evvenv update function, reliably, but VERY slowly:
string[] files = Directory.GetFiles(@"c:\MyTmp", "*.sln", SearchOption.AllDirectories); foreach (string file in files) { Process process = new Process(); process.StartInfo.FileName = pathToTheLatestVS; process.StartInfo.Arguments = "/Upgrade \"" + file + "\""; process.Start(); process.WaitForExit(); }
3) I tried to create a hidden instance of VS and manipulate the solutions there, as described here , but with no luck.
Thus, you can quickly and reliably upgrade many project / solution files to a specific version of Visual Studio?
VladL source share