Domanda

I am searching for a command that I can use in Elastic Beanstalk configuration file to install Visual C++ Redistributable for Visual Studio 2012 which I need for my web project to run.

I tried installing using msi which I built from the exe and put on S3 but it returned timeout:

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

And I still get the error:

Could not load file or assembly 'Magick.NET-x86.DLL' or one of its dependencies. The specified module could not be found.

Magick.NET needs the Visual C++ Redistributable for Visual Studio 2012 in order to run. Installing it manually is not an option as I need it pre-installed for auto scalability. Thanks.

Servers run on Windows Server 2012 / IIS8

È stato utile?

Soluzione

I recently encountered the same problem. What I ended up doing was creating scripts that are bundled with the deployment that download the redistributable from my S3 store and then install on the server during deployment. Here is what I did:

  1. Download the redistributable from http://www.microsoft.com/en-us/download/details.aspx?id=30679
  2. Upload the redistributable to your S3 store and note the URL location.

  3. In the .NET project, create a folder named .ebextensions at the top level of the project (i.e., at the same level as the App_data, App_Start, Content, etc. folders)

  4. Create a file named myapp.config (replace myapp with whatever you like). I actually created two config files (myapp-1.config and myapp-2.config) because for whatever reason the deployer didn't like the commands in Step #5 to be in the same file (I'm still learning this so I most likely screwed something up, but this worked for me).

  5. In the config file, place the following (files into myapp-1.config and commands into 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

Now, when you deploy to the Elastic Beanstalk from Visual Studio 2012, the amazon deployment process will download the vcredist_x64.exe from S3 and then run the installer in quiet mode (no prompts, etc.).

Hopefully this helps and I welcome any improvements or suggestions on this approach.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top