Altemiq.Runtime
2.0.0-beta.2
See the version list below for details.
dotnet add package Altemiq.Runtime --version 2.0.0-beta.2
NuGet\Install-Package Altemiq.Runtime -Version 2.0.0-beta.2
<PackageReference Include="Altemiq.Runtime" Version="2.0.0-beta.2" />
<PackageVersion Include="Altemiq.Runtime" Version="2.0.0-beta.2" />
<PackageReference Include="Altemiq.Runtime" />
paket add Altemiq.Runtime --version 2.0.0-beta.2
#r "nuget: Altemiq.Runtime, 2.0.0-beta.2"
#:package Altemiq.Runtime@2.0.0-beta.2
#addin nuget:?package=Altemiq.Runtime&version=2.0.0-beta.2&prerelease
#tool nuget:?package=Altemiq.Runtime&version=2.0.0-beta.2&prerelease
Altemiq.Runtime
Helpers for working with the .NET runtime itself — discovering where managed and native libraries live, resolving assemblies, and introspecting the current environment.
About
Altemiq.Runtime builds on the runtime graphs shipped in Microsoft.NETCore.Platforms to give you reliable, cross-platform answers to the questions that only the runtime can answer: where is this assembly? where are my native assets? where are the bundled tools?
Key Features
RuntimeEnvironmentextensions — locate managed, native and tool directories and add them toPATHRuntimeInformationextensions —TargetFramework,TargetPlatformandRuntimeIdentifier- Assembly resolution helpers (
Resolve) and compatibility checks (Assembly.IsCompatible) - Test-host-aware entry-assembly detection (
GetActualEntryAssembly) - String casing helpers (
ToCamelCase,ToPascalCase,ToKebabCase,ToSnakeCase,RemoveSuffix) - A
ProcessStartInfoBuilderfor constructingProcessStartInfoinstances
How to Use
Installation
dotnet add package Altemiq.Runtime
Reflection
These are designed to the classes in System.Reflection
Assembly Extensions
These provide extensions to System.Reflection.Assembly and System.Reflrection.AssemblyName
IsCompatible
Determines if the supplied assembly (name) is compatible with the required assembly name.
This is useful when trying to resolve assemblies.
var assembly = Assembly.GetEntryAssembly();
var isCompatible = assembly.IsCompatible(requiredAssemblyName);
GetActualEntryAssembly
Returns the entry assembly, taking the testhost process into account so that when running under a test host you get the assembly under test rather than the host.
var entry = Assembly.GetActualEntryAssembly();
Runtime
Interop Services
These are designed to augment the classes in System.Runtime.InteropServices
Runtime Information
This provides information about the runtime
TargetFramework gets the target framework
RuntimeIdentifier gets the runtime identifier
Runtime Environment
This provides classes for interactive with the runtime environment
GetRuntimeLibraryDirectory gets the runtime folder for managed assemblies
GetRuntimeNativeDirectory gets the runtime folder for native assets
AddRuntimeLibraryDirectory adds the runtime folder for managed assemblies to the PATH environment variable
AddRuntimeNativeDirectory adds the runtime folder for native assets to the PATH environment variable
AddRuntimeDirectories combines the above methods
Tools
When there are tools associated with a nuget package, these can be accessed via RuntimeEnvironment
GetToolsDirectory gets the runtime folder for the tools
⚠️ NOTE: from .NET 10 SDK onwards,
TrimDepsJsonLibrariesWithoutAssetsmust be set tofalseor else these tools will not be added to thedeps.jsonfile
<PropertyGroup>
<TrimDepsJsonLibrariesWithoutAssets>false</TrimDepsJsonLibrariesWithoutAssets>
</PropertyGroup>
Resolution
The Resolve static class provides functions for resolving assemblies and tools.
RuntimeAssemblies()adds anAssemblyResolvehandler that resolves assemblies in the managed library directory returned byGetRuntimeLibraryDirectories()Remove()removes the handler added byRuntimeAssemblies()Tool(executable)resolves the full path of a bundled tool executable by name
String & Globalization
Casing helpers for string, plus System.Globalization.TextInfo extensions for culture-specific casing rules.
"Hello World".ToCamelCase(); // "helloWorld"
"Hello World".ToPascalCase(); // "HelloWorld"
"Hello World".ToKebabCase(); // "hello-world"
"Hello World".ToSnakeCase(); // "hello_world"
"MyFile.txt".RemoveSuffix(".txt"); // "MyFile"
Process Start Info
Altemiq.Diagnostics.ProcessStartInfoBuilder wraps System.Diagnostics.ProcessStartInfo with settable properties and a ProcessStartInfo getter, making it simple to build and configure a start-info instance.
var startInfo = new ProcessStartInfoBuilder("myapp")
{
WorkingDirectory = @"C:\\tools",
CreateNoWindow = true,
};
var process = System.Diagnostics.Process.Start(startInfo.ProcessStartInfo);
Related Packages
Altemiq— the core Altemiq libraryAltemiq.IO.Compression— stream helpers forZipArchiveentries
Feedback & Contributing
- Report bugs and request features in the issue tracker
- Pull requests are welcome!
- Licensed under the MIT License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard1.6 is compatible. netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net451 is compatible. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 is compatible. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5.1
- Microsoft.DotNet.PlatformAbstractions (>= 3.0.0)
- Microsoft.Extensions.DependencyModel (>= 5.0.0)
- NuGet.Configuration (>= 4.0.0)
- NuGet.Frameworks (>= 4.0.0)
- System.Memory (>= 4.5.4)
- System.Net.Http (>= 4.3.4)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETFramework 4.7
- Microsoft.DotNet.PlatformAbstractions (>= 3.0.0)
- Microsoft.Extensions.DependencyModel (>= 6.0.0)
- NuGet.Configuration (>= 5.6.0)
-
.NETStandard 1.6
- Microsoft.DotNet.PlatformAbstractions (>= 3.0.0)
- Microsoft.Extensions.DependencyModel (>= 5.0.0)
- NETStandard.Library (>= 1.6.1)
- NuGet.Configuration (>= 4.0.0)
- NuGet.Frameworks (>= 4.0.0)
- System.Memory (>= 4.5.4)
- System.Net.Http (>= 4.3.4)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 2.0
- Microsoft.DotNet.PlatformAbstractions (>= 3.0.0)
- Microsoft.Extensions.DependencyModel (>= 6.0.0)
- NuGet.Configuration (>= 5.6.0)
-
net5.0
- Microsoft.Extensions.DependencyModel (>= 6.0.0)
- NuGet.Configuration (>= 5.6.0)
-
net6.0
- Microsoft.Extensions.DependencyModel (>= 6.0.0)
- NuGet.Configuration (>= 5.6.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Altemiq.Runtime:
| Package | Downloads |
|---|---|
|
Altemiq.Aspire.Hosting.Grpc
gRPC support for .NET Aspire. |
|
|
Altemiq.CommandLine.Native
Altemiq CommandLine assemblies. |
|
|
Altemiq.Data.Spatialite.Core
Altemiq is a lightweight ADO.NET provider for SpatiaLite. This package does not include a copy of the native SpatiaLite library. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 155 | 12/1/2026 |
| 2.0.0-beta.2 | 55 | 12/1/2026 |
| 2.0.0-beta.1 | 75 | 11/30/2026 |
| 2.0.0-beta.0 | 67 | 11/12/2026 |
| 2.0.0-beta | 149 | 7/10/2026 |
| 1.3.1-beta.3 | 107 | 6/23/2026 |
| 1.3.1-beta.2 | 105 | 6/22/2026 |
| 1.3.1-beta.1 | 115 | 2/18/2026 |
| 1.3.1-beta.0 | 122 | 1/15/2026 |
| 1.3.1-beta | 491 | 12/10/2025 |
| 1.3.0 | 10,449 | 11/19/2025 |
| 1.3.0-beta.4 | 423 | 11/18/2025 |
| 1.3.0-beta.3 | 343 | 11/17/2025 |
| 1.3.0-beta.2 | 201 | 10/16/2025 |
| 1.3.0-beta.1 | 203 | 10/9/2025 |
| 1.3.0-beta.0 | 214 | 7/9/2025 |
| 1.3.0-beta | 261 | 7/8/2025 |
| 1.2.1 | 2,480 | 7/8/2025 |
| 1.2.0 | 264 | 7/8/2025 |
| 1.1.0 | 400 | 7/8/2025 |