【发布时间】:2015-01-30 00:48:42
【问题描述】:
有几个答案(例如this 和this)和a blog post 指出如何在部署 Azure 云服务时安装 Visual C++ 2010 可再发行包。
首先,您将 vcredist_x64.exe 添加到 Web 项目,并将其“复制到输出目录”属性设置为“如果较新则复制”或“始终复制”。然后对包含单行的命令文件(在我的情况下为“InstallVC.cmd”)执行相同操作:
vcredist_x64.exe /q /norestart
然后编辑 ServiceDefinition.csdef 文件以包含设置
<Startup>
<Task commandLine="InstallVC.cmd" executionContext="elevated" taskType="simple" />
</Startup>
在角色内。答案和博客文章继续指出,如果将 ServiceConfiguration.csfg 上的 osFamily 设置设置为 osFamily="1" 并且需要将其设置为 osFamily="2",则启动任务将挂起.
我的设置为 osFamily="4",但部署失败。我收到错误消息Role has encountered an error and has stopped. Application startup task failed with exit code 5100。
您如何安装 Visual C++ 2010 可再发行包,作为使用较新的 Azure 操作系统系列部署 Azure 云服务的一部分?
【问题讨论】:
标签: azure azure-web-roles vcredist