1

I plan to publish my ASP.NET 4.5 application on Amazon Elastic Beanstalk. I have a library ImageMagick.NET that dependent on the Visual C++ Redistributable Packages.

I can't manually install the packages because I deploy the app from within Visual Studio and the servers will auto-scale based on the code that I have.

I want to install the Visual C++ Redistributable for both x86 and x64 so my app can work as intendent.

Right now I get the error:

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

That's because I didn't have the packages installed on the server (asked this question earlier).

So from my understanding, I need a way for the packages to be pre-installed, probably either supplying dll's to the bin folder with the merge modules, or initialize an installer from within the project that will launch the package installer after the project is deployed on Elastic Beanstalk.

I need a way to have those packages installed automatically so the ImageMagick.NET dll can work. Thanks.

update: their might be a way to do it with configuration files.

Community
  • 1
  • 1
Liron Harel
  • 10,819
  • 26
  • 118
  • 217

1 Answers1

1

The right way is to use Elastic Beanstalk Configuration files.

These are YAML files, where you can add commands (in the specified format) and upload along with your application package. You could do things like creating files, installing libraries etc. Most of the command line (headless) doable stuff could be handled here.

Customizing the Software on EC2 Instances Running Windows - AWS Elastic Beanstalk : http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-windows-ec2.html

Each time you deploy a new version or re-start the servers, these scripts execute and you can achieve pretty much any customisation.

Sony Kadavan
  • 3,982
  • 2
  • 19
  • 26
  • I know that Sony, I am aware of that. I can't figure out the command or how to employ the right configuration to install VC++ 2012. – Liron Harel Mar 08 '14 at 03:33
  • Ok. So you need a silent install cmdline. See if this take you further (this is for 2010, though): http://blogs.msdn.com/b/astebner/archive/2010/10/20/10078468.aspx – Sony Kadavan Mar 08 '14 at 03:50
  • Looks like your will have to keep the executable in S3, download in the eb script and then execute with the " /q /norestart" flags. – Sony Kadavan Mar 08 '14 at 07:59
  • @IdanShechter what exactly "didn't work"? I'm facing a similar deployment situation. From what I read the S3/ebscript option Sony mentioned above is the recommended procedure for this. – stonedauwg Mar 19 '15 at 14:45