Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

AZ executable doesn't launch properly on Windows #611

Description

After the release of version 0.3.2, we've found that the Azure CLI extension can no longer launch az properly. It always fails with an error like the one below:

An error occurred trying to start process 'C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin\az' with working directory 'x'. The specified executable is not a valid application for this OS platform.

   at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.Process, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at AzureMcp.Services.ProcessExecution.ExternalProcessService+<ExecuteAsync>d__1.MoveNext (azmcp, Version=0.3.2.0, Culture=neutral, PublicKeyToken=null: D:\a\_work\1\s\src\Services\ProcessExecution\ExternalProcessService.cs:68)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult (System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at AzureMcp.Areas.Extension.Commands.AzCommand+<ExecuteAsync>d__18.MoveNext (azmcp, Version=0.3.2.0, Culture=neutral, PublicKeyToken=null: D:\a\_work\1\s\src\Areas\Extension\Commands\AzCommand.cs:169)
Image

We've confirmed that version 0.3.1 works properly:

Image

We've replicated this behavior on Windows Server 2025 and Windows 11, where the AZ CLI was installed with MSI packages. On our systems, it seems we have an az bash script in the PATH:

PS C:\> where.exe az
C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin\az
C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin\az.cmd
Image

We haven't been able to confirm, but it seems likely the new issue is related to #351 and #552. Thanks in advance!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions