用于安装Visual C++ Redistributable的Elastic Beanstalk配置的命令

Ida*_*ter 5 redistributable imagemagick amazon-web-services visual-studio amazon-elastic-beanstalk

我正在搜索一个命令,我可以在Elastic Beanstalk配置文件中使用它来安装Visual Studio 2012的Visual C++ Redistributable,这是我运行Web项目所需要的.

我尝试使用msi我从exe构建的安装并放入S3,但它返回超时:

The following instances have not responded in the allowed command timeout time (they might still finish eventually on their own)
Run Code Online (Sandbox Code Playgroud)

我仍然得到错误:

Could not load file or assembly 'Magick.NET-x86.DLL' or one of its dependencies. The specified module could not be found.
Run Code Online (Sandbox Code Playgroud)

Magick.NET需要Visual C++ Redistributable for Visual Studio 2012才能运行.手动安装它不是一个选项,因为我需要预先安装它以实现自动可扩展性.谢谢.

服务器在Windows Server 2012/IIS8上运行

小智 7

我最近遇到了同样的问题.我最终做的是创建与部署捆绑在一起的脚本,该部署从我的S3商店下载可再发行组件,然后在部署期间安装在服务器上.这是我做的:

  1. http://www.microsoft.com/en-us/download/details.aspx?id=30679下载可再发行组件
  2. 将可再发行组件上载到S3商店并记下URL位置.

  3. 在.NET项目中,在项目的顶层创建一个名为.ebextensions的文件夹(即,与App_data,App_Start,Content等文件夹处于同一级别)

  4. 创建一个名为myapp.config的文件(用你喜欢的任何东西替换myapp).我实际上创建了两个配置文件(myapp-1.config和myapp-2.config),因为无论出于何种原因,部署者都不喜欢步骤#5中的命令在同一个文件中(我还在学习这个,所以我最有可能搞砸了,但这对我有用).

  5. 在配置文件中,将以下内容(文件放入myapp-1.config和命令到myapp-2.config):

    files:
     "c:\\somedirectoy\\vcredist_x64.exe":
       source: https://s3.amazonaws.com/yours3location/2012vcredist_x64.exe

    commands:
      instlVC:
          command: c:\\somedirectory\\vcredist_x64.exe /q /norestart

现在,当您从Visual Studio 2012部署到Elastic Beanstalk时,亚马逊部署过程将从S3下载vcredist_x64.exe,然后以安静模式运行安装程序(无提示等).

希望这有帮助,我欢迎任何有关此方法的改进或建议.