如何批量升级解决方案文件以在 Visual Studio 2013 中打开? [英] How can you batch upgrade solution files to open in Visual Studio 2013?
问题描述
这类似于 如何强制在 Visual Studio 2013 中打开解决方案文件 (SLN)? 但不是相同.我有一堆与 Visual Studio 版本选择器关联的 .sln 文件.但是,它们都包含 # Visual Studio 2012
但我希望它们改为在 Visual Studio 2013 中打开.我可以根据 /upgrade 标志打开解决方案文件">此链接.然而,它只是说
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.
并且不会更改文件,因此它们仍然在 VS2012 中打开.您可以在 Visual Studio 2013 中明确打开解决方案并执行另存为,但这是一个非常手动的过程,我有数百个解决方案.肯定有比在文件中查找/替换更好的方法吗?
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?
推荐答案
我还没有尝试过,但是...使用格式为 devenv "MyProject.sln"/upgrade
的命令你可以递归所有文件夹并升级所有.sln
、.csproj
等文件.我从 https://stackoverflow.com/a/27625352/492 获得了 devenv .../upgrade
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
这篇关于如何批量升级解决方案文件以在 Visual Studio 2013 中打开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!