Skip to content

sqlserver PowerShell module (22.4.5.1) and modular AWS.Tools modules (5.0.11) conflicting #392

@andrewcurrie1984

Description

@andrewcurrie1984

Describe the bug

When I Import the sqlserver PowerShell module, version 22.4.5.1 and then attempt to run Copy-S3Object using the modular AWS.Tools modules, version 5.0.11 we get the following error:

Copy-S3Object : Could not load file or assembly 'System.IO.Pipelines, Version=9.0.0.0, Culture=neutral,
PublicKeyToken=___________' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1
+ Copy-S3Object -BucketName _____ -Key _____ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Amazon.PowerShe...yS3ObjectCmdlet:CopyS3ObjectCmdlet) [Copy-S3Object]
   , InvalidOperationException
    + FullyQualifiedErrorId : System.IO.FileNotFoundException,Amazon.PowerShell.Cmdlets.S3.CopyS3ObjectCmdlet

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Copy-S3Object should not produce an error and copy the file.

Current Behavior

If we import the sqlserver module before the AWS.Tools.s3 module it will produce this error:

Copy-S3Object : Could not load file or assembly 'System.IO.Pipelines, Version=9.0.0.0, Culture=neutral,
PublicKeyToken=___________' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1
+ Copy-S3Object -BucketName _____ -Key _____ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Amazon.PowerShe...yS3ObjectCmdlet:CopyS3ObjectCmdlet) [Copy-S3Object]
   , InvalidOperationException
    + FullyQualifiedErrorId : System.IO.FileNotFoundException,Amazon.PowerShell.Cmdlets.S3.CopyS3ObjectCmdlet

Reproduction Steps

Import-Module sqlserver
Import-Module AWS.Tools.s3
Copy-S3Object -BucketName <bucketName> -Key <key> -LocalFile <Localfile> -Region us-east-1

Possible Solution

I am setting the sqlserver PowerShell module to 22.3 which does not cause this issue.

Additional Information/Context

No response

AWS Tools for PowerShell version used

AWS.Tools.s3 5.0.11

PowerShell version used

$PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      17763  6766

sqlserver 22.4.5.1

Operating System and version

Windows Server 2019 Datacenter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions