Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win-arm64 support for WAM #20797

Merged
merged 3 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Accounts/Accounts/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
-->

## Upcoming Release
* Supported Web Account Manager on ARM64-based Windows systems. Fixed an issue where `Connect-AzAccount` failed with error "Unable to load DLL 'msalruntime_arm64'". [#20700]

## Version 2.11.1
* Fixed an issue where Az.Accounts cannot be imported correctly. [#20615]
Expand Down
Binary file added src/lib/netstandard2.0/msalruntime_arm64.dll
Binary file not shown.
1 change: 1 addition & 0 deletions src/lib/pdb/CopyPdbToArtifacts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Param(
$PathMappings = @{
'msalruntime.pdb' = 'Az.Accounts/lib/netstandard2.0'
'msalruntime_x86.pdb' = 'Az.Accounts/lib/netstandard2.0'
'msalruntime_arm64.pdb' = 'Az.Accounts/lib/netstandard2.0'
}

$ArtifactsPath = [System.IO.Path]::Combine($PSScriptRoot, "../../../artifacts", $Configuration)
Expand Down
12 changes: 0 additions & 12 deletions src/lib/pdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,3 @@ This directory serves as an E2E solution. You put the PDB files here, tell the s
1. Put the PDB file in `src/lib/pdb`.
2. Update [`CopyPdbToArtifacts.ps1`](./CopyPdbToArtifacts.ps1), in the hashtable `$PathMappings`, add a new entry of the PDB's name and its destination, i.e. where the corresponding .dll file lies in artifacts.
3. Check in and push your code. Note that PDB files are ignored by `.gitignore`. You need to explicitly add them by `git add -f path/to/*.pdb`.## What is lib/pdb for

In the [security tools pipeline](../../../.azure-pipelines/security-tools.yml), one step called BinSkim would scan all of the assemblies and executables in the artifacts. When scanning assemblies, it requires the corresponding Program Database (PDB) files. Most cases BinSkim is smart enough to find them, for example by downloading the symbol package from nuget.org. However if it fails to do so, you could get an [`E_PDB_NOT_FOUND`](https://github.com/microsoft/binskim/blob/7b64cf4ff69d2c6d8c4945be821d361b24e2169f/docs/RulesAndErrorsTroubleshootingGuide.md#resolving-e_pdb_not_found) error.

The solution is to grab the PDB file elsewhere (maybe by asking the developers), and then put them next to the assemblies. But keep in mind that we don't want to ship them to the end user because they are useless at runtime and they are big.

This directory serves as an E2E solution. You put the PDB files here, tell the script where their corresponding assemblies are, and the script will copy them to the right place before the BinSkim scan.

## How to add a new PDB file

1. Put the PDB file in `src/lib/pdb`.
2. Update [`CopyPdbToArtifacts.ps1`](./CopyPdbToArtifacts.ps1), in the hashtable `$PathMappings`, add a new entry of the PDB's name and its destination, i.e. where the corresponding .dll file lies in artifacts.
3. Check in and push your code. Note that PDB files are ignored by `.gitignore`. You need to explicitly add them by `git add -f path/to/*.pdb`.
Binary file added src/lib/pdb/msalruntime_arm64.pdb
Binary file not shown.