aws / aws/aws-tools-for-powershell
sqlserver PowerShell module (22.4.5.1) and modular AWS.Tools modules (5.0.11) conflicting
- Dominant language
- C#
- Stars
- 298
- Forks
- 102
- Avg merge
- 7d 17m
- Merged PRs (30d)
- 2
Description
### 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 -Key -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.
Contributor guide
Research direction
Reproduce the conflict using the listed PowerShell 5.1 environment and the Import-Module sqlserver, Import-Module AWS.Tools.s3, and Copy-S3Object sequence. Compare behavior with sqlserver 22.3 and 22.4.5.1, then trace the module or assembly-loading path involved. Done means Copy-S3Object successfully copies the file after sqlserver 22.4.5.1 is imported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, powershell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100