aws / aws-tools-for-powershell

The AWS Tools for PowerShell lets developers and administrators manage their AWS services from the PowerShell scripting environment.
Apache License 2.0
235 stars 78 forks source link

Cannot Import Module due to "Could not load file or assembly 'netstandard" #210

Closed animusyosho closed 3 years ago

animusyosho commented 3 years ago

I'm having a really difficult time importing Aws.Tools.Common on a fairly new windows server (2016 - up to date with windows updates). Installing the module goes fine, but importing it results in this error: Import-Module : Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

It seems like this is a failure to load .net. I know you state 3.5 is required. I've tried installing .net 3.5, 2, 4 - The module still cannot import. Is there some programatic way I can ensure dependencies for this module are installed at the beginning of a script in order to avoid these issues with new servers going forward?

ashishdhingra commented 3 years ago

Hi @animusyosho,

Good morning.

Unfortunately, I'm unable to reproduce the issue on a fresh Windows Server 2016 EC2 instance. AWS.Tools is the new modularized version of AWS Tools for PowerShell, compatible with PowerShell Core 6+ and Windows Powershell 5.1+ (when .NET Framework 4.7.2+ is installed)..

Could you please provide information in the following format:

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

.NET Core Info

Thanks, Ashish