如何从命令行升级解决方案和项目文件 [英] How to upgrade a solution and project files from the command line

查看:137
本文介绍了如何从命令行升级解决方案和项目文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Microsoft的 Visual Studio 2015社区版测试免费和开源软件 a>(以及此处)以确保与编译器和工具的兼容性. 30天的试用期已过期,因此我需要从命令行进行操作,因为在告诉我试用期已过期之后,IDE便存在了:

I am testing Free and Open Source Software using Microsoft's Visual Studio 2015 Community Edition (and here) to ensure compatibility with the compiler and tools. The 30 day trial has expired, so I need to work from the command line because the IDE exists after telling me the trial has expired:

当我尝试从命令行运行msbuild时,出现了一些顶级错误:

When I try to run msbuild from the command line, I get a couple of top level errors:

Test> msbuild cryptest.sln
Microsoft (R) Build Engine version 14.0.23107.0
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
Build started 9/7/2015 7:58:54 AM.
Project "...\cryptest.sln" on node 1
 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|Win32".
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
 To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.  [...\cryptest.sln]
Done Building Project "...\cryptest.sln" (default targets) -- FAILED.

Build FAILED.

"...\cryptest.sln" (default target)
(1) ->
(cryptlib target) ->
  MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe
". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Vis
ual Studio 2005 or 3) add the location of the component to the system path if i
t is installed elsewhere.  [...\cryptest.sln]

    0 Warning(s)
    1 Error(s)

上面的问题归因于较低级别的(Visual Studio 2008)解决方案和项目文件.

The problems above are due to a down level (Visual Studio 2008) solution and project files.

官方文档位于如何:将Visual C ++项目升级到Visual Studio 2015 ,但是该页面没有讨论从命令行升级解决方案.

The official docs are at How to: Upgrade Visual C++ Projects to Visual Studio 2015, but the page does not discuss a solution upgrade from the command line.

根据VC ++团队博客,网址为

According to the VC++ Team Blog at Visual Studio 2010 C++ Project Upgrade Guide, there's a VCUpgrade.exe located in $(VSInstallDir)\common7\Tools. But: "... [VCUpgrade.exe is only] suitable for upgrading applications with only one project as it cannot take in solution file as input and parse solution information into project files."

我还在将项目升级到Visual C ++ 2010 . .aspx"rel =" nofollow noreferrer>构建使用Windows SDK的应用程序.它告诉我使用devenv.exe /upgrade.当我按照其说明进行操作时,结果如下.没有错误,但未进行任何转换(也未创建日志文件).

I also found Upgrading Projects to Visual C++ 2010 at Building Applications that Use the Windows SDK. It tells me to use devenv.exe /upgrade. When I follow its instructions, it results in the following. There were no errors, but nothing was converted (and no log file was created).

!! From VS2015 Developer Command Line Prompt
cryptopp-5.6.3>devenv.exe /upgrade
cryptopp-5.6.3>dir *.vcproj *.vcxproj
...

09/07/2015  10:36 AM            81,845 cryptdll.vcproj
09/07/2015  10:36 AM            40,168 cryptest.vcproj
09/07/2015  10:36 AM           205,529 cryptlib.vcproj
09/07/2015  10:36 AM             8,885 dlltest.vcproj

尝试使用VCupgrade.exe(即使根据Microsoft文档,它是不完整的解决方案)也会导致:

Attempting to use VCupgrade.exe (even though its an incomplete solution according to the Microsoft docs) results in:

cryptopp-5.6.3>vcupgrade cryptest.vcproj
Microsoft (R) Visual C++ Project Convert Utility - Version 14.00.23107
Copyright (C) Microsoft Corporation. All rights reserved.

Failed to initialize the VCProjectEngine.

如何将解决方案和项目文件从早期版本的Visual Studio转换为Visual Studio 2015?

How do I convert a solution and project files from an earlier version of Visual Studio to Visual Studio 2015?

还有一些类似的问题,但是它们并没有包含诸如无法初始化VCProjectEngine失败" 和[无法解释的]到期试用之类的错误的命令行.例如,请参见使用Visual Studio Express在命令行上升级Visual Studio解决方案.

There's a few similar questions, but they don't cover the command line with errors like "Failed to initialize the VCProjectEngine" and the [unexplained] expiring trial. See, for example, Upgrade a visual studio solution on the command line with visual studio express.

Microsoft热情地(以一种病态的方式)将Visual Studio 2015社区称为免费的开发工具,并且并未在 Visual Studio社区页面.实际上,Microsoft告诉我们其功能全面且免费的开放源代码项目(此项目为该项目).

Humorously (in a morbid sort of way), Microsoft calls Visual Studio 2015 Community a free dev tool, and does not state its an expiring trial at Overview of Visual Studio 2015 Products or Visual Studio Community pages. In fact, Microsoft tells us its fully featured and free for Open Source projects (which this project is).

我想微软撒谎了,律师把它埋在了服务条款的某个地方.更幽默地说,服务条款"中都没有提及或提及试用"或到期".请参阅Microsoft的 Visual Studio社区许可条款.

I guess Microsoft lied and the lawyers buried it in the Terms of Service somewhere. More humorously, neither "trial" nor "expire" are called out or mentioned at the Terms of Service, either. See Microsoft's Visual Studio Community license terms.

并不是很幽默,我回顾了Microsoft的营销文献后拒绝了Visual Studio Professional的副本,因为我 思想 社区版可以满足项目的需求.我希望这不会是500美元的错误...

Not so humorously, I declined a copy of Visual Studio Professional after reviewing Microsoft's marketing literature because I thought Community edition would meet the project's needs. I hope that does not turn out to be a $500 USD mistake...

推荐答案

似乎最好(也是最受支持的)选择是

It seems the best (and most supported) choice might be to just sign-in with a Microsoft account, so that you can use the free Community Edition license. This will allow you to open the development environment and upgrade the solution using the intended / most-well-tested upgrade process.

这篇关于如何从命令行升级解决方案和项目文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆