WhatArch 0.1.5
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global WhatArch --version 0.1.5
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.5
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=WhatArch&version=0.1.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package WhatArch --version 0.1.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
WhatArch
A .NET 10 command-line 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, AnyCPU (32-bit preferred), x86 (.NET), x64 (.NET), ARM64 (.NET)
- Simple, script-friendly output
- No external dependencies - parses PE headers directly
Installation
As a Global Tool
dotnet pack
dotnet tool install --global --add-source ./nupkg WhatArch
Build and Run Locally
dotnet build
dotnet run -- <path-to-binary>
Usage
whatarch <path-to-binary>
Examples
# Native binaries
whatarch C:\Windows\System32\kernel32.dll
> x64
whatarch C:\Windows\SysWOW64\kernel32.dll
> x86
# .NET assemblies
whatarch MyApp.dll
> AnyCPU
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.
See docs/architecture.md for technical details.
Requirements
- .NET 10 SDK
- Windows (PE files are Windows-specific)
License
MIT
| 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.