Skip to content

Fix assembly issue cause by Azure.Core 1.22.0 upgrade, which make storage cmdlet fail#17604

Closed
blueww wants to merge 1 commit intoAzure:mainfrom
wastoresh:assemblyfix
Closed

Fix assembly issue cause by Azure.Core 1.22.0 upgrade, which make storage cmdlet fail#17604
blueww wants to merge 1 commit intoAzure:mainfrom
wastoresh:assemblyfix

Conversation

@blueww
Copy link
Copy Markdown
Member

@blueww blueww commented Mar 24, 2022

Description

Fix some cmdlets failure with assembly not load correctly.
This is related with Azure.Core 1.22.0 upgrade. This fix might not be full, there can be other assembly need upgrade version.

first meet :

$result = Get-AzDataLakeGen2ChildItem -Context $ctx -FileSystem $filesystemName
Get-AzDataLakeGen2ChildItem : Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
At line:2 char:19
+ ... $result = Get-AzDataLakeGen2ChildItem -Context $ctx -FileSystem $fi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzDataLakeGen2ChildItem], FileNotFoundException
+ FullyQualifiedErrorId : FileNotFoundException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzDataLakeGen2ChildItemCommand

Then after upgrade System.Numerics.Vectors version in https://github.com/Azure/azure-powershell/blob/main/src/Accounts/Authentication/Utilities/CustomAssemblyResolver.cs, will meet another error:

$result = Get-AzDataLakeGen2ChildItem -Context $ctx -FileSystem $filesystemName
Get-AzDataLakeGen2ChildItem : Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
At line:2 char:19
+ ... $result = Get-AzDataLakeGen2ChildItem -Context $ctx -FileSystem $fi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzDataLakeGen2ChildItem], FileNotFoundException
+ FullyQualifiedErrorId : FileNotFoundException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzDataLakeGen2ChildItemCommand

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated: - No change log needed, as Azure.Core is just upgraded.
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
      • {Please put the link here}
    • the markdown help files have been regenerated using the commands listed here

@blueww
Copy link
Copy Markdown
Member Author

blueww commented Mar 24, 2022

@dingmeng-xue

If you have a better fix for this issue, feel free to close this one. and merge yours.

@blueww
Copy link
Copy Markdown
Member Author

blueww commented Mar 25, 2022

The failure looks not related with my change:

2022-03-24T13:30:32.3067691Z X Microsoft.Azure.Commands.Peering.Test.ScenarioTests.ScenarioExchangePeeringTests.TestUpdateExchangeIPv6OnResourceId [666ms]
2022-03-24T13:30:32.3075200Z EXEC : error Message: [D:\a\1\s\build.proj]
2022-03-24T13:30:32.3349694Z System.Management.Automation.MethodInvocationException : Exception calling "OffSet" with "4" argument(s): "An invalid IP address was specified. (Parameter 'address')"
2022-03-24T13:30:32.3353282Z ---- System.ArgumentException : An invalid IP address was specified. (Parameter 'address')

@blueww
Copy link
Copy Markdown
Member Author

blueww commented Mar 25, 2022

/azp run

@blueww
Copy link
Copy Markdown
Member Author

blueww commented Apr 2, 2022

Close per #17622 is already merged.

@blueww blueww closed this Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant