WhatArch 0.1.19
dotnet tool install --global WhatArch --version 0.1.19
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local WhatArch --version 0.1.19
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=WhatArch&version=0.1.19
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package WhatArch --version 0.1.19
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
![]()
WhatArch
A .NET tool for Windows that detects the target architecture of native binaries and .NET assemblies.
Features
- Detects native binary architectures: x86, x64, ARM64, ARM
- Identifies .NET assembly configurations: AnyCPU (.NET), AnyCPU (.NET - 32-bit preferred), x86 (.NET), x64 (.NET), ARM64 (.NET)
- Simple, script-friendly output
- No external dependencies - parses PE headers directly
Requirements
- Windows (PE files are Windows-specific)
- .NET 10 SDK
Installation
dotnet tool install --global WhatArch
Update the tool
dotnet tool update --global WhatArch
Usage
whatarch <path-to-binary>
Examples
# Native binaries (by name - searches PATH, adds .exe automatically on Windows)
whatarch notepad
> ARM64
whatarch cmd
> x64
# Native binaries (by path)
whatarch C:\Windows\System32\kernel32.dll
> x64
whatarch C:\Windows\SysWOW64\kernel32.dll
> x86
# .NET assemblies
whatarch MyApp.dll
> AnyCPU (.NET)
whatarch MyApp.x64.dll
> x64 (.NET)
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (file not found, invalid PE, etc.) |
How It Works
WhatArch reads the PE (Portable Executable) file headers to determine the target architecture. For .NET assemblies, it also examines the CLR header and CorFlags to distinguish between AnyCPU and platform-specific builds.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.