【发布时间】:2015-09-07 12:12:28
【问题描述】:
我正在使用 Microsoft 的 Visual Studio 2015 Community Edition(和 here)测试免费和开源软件,以确保与编译器和工具的兼容性。 30 天试用已过期,所以我需要从命令行工作,因为在告诉我试用已过期后 IDE 存在:
当我尝试从命令行运行 msbuild 时,我得到了几个顶级错误:
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) 解决方案和项目文件造成的。
官方文档位于How to: Upgrade Visual C++ Projects to Visual Studio 2015,但该页面并未讨论从命令行升级解决方案。
根据Visual Studio 2010 C++ Project Upgrade Guide 的VC++ 团队博客,VCUpgrade.exe 位于$(VSInstallDir)\common7\Tools。但是:"... [VCUpgrade.exe is only] 适用于升级只有一个项目的应用程序,因为它不能将解决方案文件作为输入并将解决方案信息解析到项目文件中。"
我还在Building Applications that Use the Windows SDK 找到将项目升级到 Visual C++ 2010。它告诉我使用devenv.exe /upgrade。当我按照它的说明进行操作时,结果如下。没有错误,但没有进行任何转换(也没有创建日志文件)。
!! 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 文档它是一个不完整的解决方案)会导致:
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?
有一些类似的问题,但它们没有涵盖命令行错误,例如 “无法初始化 VCProjectEngine” 和 [unexplained] 即将到期的试用版。例如,请参阅Upgrade a visual studio solution on the command line with visual studio express。
幽默地(以一种病态的方式),Microsoft 将 Visual Studio 2015 Community 称为免费开发工具,并且在Overview of Visual Studio 2015 Products 或Visual Studio Community 页面上没有说明其试用期即将到期。事实上,微软告诉我们其功能齐全且免费的开源项目(即本项目)。
我猜微软撒了谎,律师把它埋在服务条款的某个地方。更幽默的是,服务条款中也没有提到或提及“试用”或“过期”。请参阅 Microsoft 的 Visual Studio Community license terms。
不那么幽默,在查看了 Microsoft 的营销文献后,我拒绝了 Visual Studio Professional 的副本,因为我认为社区版可以满足项目的需求。我希望这不会是 500 美元的错误......
【问题讨论】:
-
你检查过这个吗:blogs.msdn.com/b/visualstudio/archive/2015/08/07/… "这里的试用是指在你必须登录才能完全解锁 IDE 之前你可以使用社区版的期限。"
-
谢谢西蒙。我什至不知道存在常见问题解答(并且在某人的博客上,但如此)。据我所知,微软在事后改变了条款。 FAQ 没有讨论细节,例如适用于 IDE 和 VCupgrade 的试用版,还是适用于所有内容,例如编译器和链接器。
-
从法律上讲,我想整个软件包都受许可条款的约束。从技术上讲,它具体取决于 exe 等。但大多数工具都很难(并且每个新版本都变得越来越难)在没有 IDE 的情况下使用 - 从技术上讲,IDE 绑定在在线帐户上。
-
我使用社区版没有试用过期问题大约 2 个月。您确定您的安装是因为 CE 而过期的,而不仅仅是过期的登录令牌或 VS 2015 Ultimate 或其他任何过期试用版中的一些旧注册表记录?
-
Alexey - 你猜和我的一样好(或者我的和你的一样好)。我也找不到日志文件。以下是相关问题:Where are Developer Studio logs written?.
标签: visual-studio visual-c++ msbuild visual-studio-2015 upgrade