WoofWare.DotnetRuntimeLocator
0.3.2
dotnet add package WoofWare.DotnetRuntimeLocator --version 0.3.2
NuGet\Install-Package WoofWare.DotnetRuntimeLocator -Version 0.3.2
<PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.3.2" />
<PackageVersion Include="WoofWare.DotnetRuntimeLocator" Version="0.3.2" />
<PackageReference Include="WoofWare.DotnetRuntimeLocator" />
paket add WoofWare.DotnetRuntimeLocator --version 0.3.2
#r "nuget: WoofWare.DotnetRuntimeLocator, 0.3.2"
#addin nuget:?package=WoofWare.DotnetRuntimeLocator&version=0.3.2
#tool nuget:?package=WoofWare.DotnetRuntimeLocator&version=0.3.2
WoofWare.DotnetRuntimeLocator
Helpers to locate the .NET runtime and SDKs programmatically.
(If you're parsing dotnet --list-runtimes
, you're doing it wrong!)
Usage
See the example.
let info = DotnetEnvironmentInfo.Get ()
// or, if you already know a path to the `dotnet` executable...
let info = DotnetEnvironmentInfo.GetSpecific "/path/to/dotnet"
// identify the directories containing the framework which would execute a given DLL
let dirsToSearch : string seq = DotnetRuntime.SelectForDll "/path/to/dll.dll"
// or, if you would be running with a specific `/path/to/dotnet exec /path/to/dll.dll`:
let dirsToSearch : string seq = DotnetRuntime.SelectForDll ("/path/to/dll.dll", "/path/to/dotnet")
Troubleshooting
The easiest way to make sure we can find a dotnet
is to have one on your PATH.
If you have a very strange setup, we may be unable to locate the libhostfxr
library we use to find the runtimes.
In that case, you can supply the environment variable WOOFWARE_DOTNET_LOCATOR_LIBHOSTFXR
,
which should be a full path to a libhostfxr
DLL on your system.
(Normally this is in /usr/share/dotnet/host/fxr/{runtime}/libhostfxr.so
;
you must make sure your version is from runtime 6 or greater,
because the required symbols were not added until then.)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on WoofWare.DotnetRuntimeLocator:
Package | Downloads |
---|---|
WoofWare.NUnitTestRunner.Lib
Library with primitives to allow you to run NUnit tests. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.3.2 | 372 | 5/16/2025 |
0.3.1 | 159 | 5/16/2025 |
0.2.1 | 178 | 5/16/2025 |
0.1.12 | 547 | 3/21/2025 |
0.1.11 | 1,429 | 11/24/2024 |
0.1.10 | 98 | 11/24/2024 |
0.1.9 | 2,907 | 6/17/2024 |
0.1.8 | 102 | 6/17/2024 |
0.1.7 | 98 | 6/17/2024 |
0.1.6 | 107 | 6/17/2024 |
0.1.5 | 131 | 6/16/2024 |
0.1.4 | 712 | 6/9/2024 |
0.1.3 | 240 | 6/9/2024 |
0.1.2 | 316 | 6/7/2024 |