Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Can't run PowerShell on Ubuntu 20.04 arm64 due to a problem with the 'Microsoft.ApplicationInsights' assembly #19055

Copy link
Copy link
@damonbarry

Description

@damonbarry
Issue body actions

Prerequisites

Steps to reproduce

On a fresh Ubuntu 20.04 arm64 VM, I installed the .NET 6.0 SDK (version 6.0.405). Then I took the following steps:

curl -sSL 'https://pwshtool.blob.core.windows.net/tool/7.2.9/PowerShell.Linux.arm64.7.2.9.nupkg' -o 'PowerShell.Linux.arm64.7.2.9.nupkg'
sudo mkdir -p /usr/share/powershell
sudo dotnet tool install --add-source . --tool-path /usr/share/powershell --version '7.2.9' PowerShell.Linux.arm64
sudo dotnet nuget locals all --clear
sudo ln -s /usr/share/powershell/pwsh /usr/bin/pwsh
sudo chmod 755 /usr/share/powershell/pwsh
pwsh

Expected behavior

`pwsh` should open a PowerShell session. And, in fact, it works as expected with previous versions, e.g., https://pwshtool.blob.core.windows.net/tool/7.2.8/PowerShell.Linux.arm64.7.2.8.nupkg.

Actual behavior

azureuser@my-arm-vm:~$ pwsh
PowerShell 7.2.9
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

Process terminated. Could not load file or assembly 'Microsoft.ApplicationInsights, Version=2.21.0.429, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. An attempt was made to load a program with an incorrect format.

   at System.Environment.FailFast(System.String, System.Exception)
   at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String[], Int32)
   at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])
System.BadImageFormatException: Could not load file or assembly 'Microsoft.ApplicationInsights, Version=2.21.0.429, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. An attempt was made to load a program with an incorrect format.

File name: 'Microsoft.ApplicationInsights, Version=2.21.0.429, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Microsoft.PowerShell.Telemetry.ApplicationInsightsTelemetry.SendPSCoreStartupTelemetry(String mode)
   at Microsoft.PowerShell.ConsoleHost.Start(String bannerText, String helpText)
   at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc)Aborted (core dumped)

Error details

N/A

Environment data

N/A

Visuals

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productNeeds-InvestigationThe behavior reported in the issue is unexpected and needs further investigation.The behavior reported in the issue is unexpected and needs further investigation.Resolution-FixedThe issue is fixed.The issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.