WoofWare.DotnetRuntimeLocator 0.5.5

dotnet add package WoofWare.DotnetRuntimeLocator --version 0.5.5
                    
NuGet\Install-Package WoofWare.DotnetRuntimeLocator -Version 0.5.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.5.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WoofWare.DotnetRuntimeLocator" Version="0.5.5" />
                    
Directory.Packages.props
<PackageReference Include="WoofWare.DotnetRuntimeLocator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WoofWare.DotnetRuntimeLocator --version 0.5.5
                    
#r "nuget: WoofWare.DotnetRuntimeLocator, 0.5.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package WoofWare.DotnetRuntimeLocator@0.5.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WoofWare.DotnetRuntimeLocator&version=0.5.5
                    
Install as a Cake Addin
#tool nuget:?package=WoofWare.DotnetRuntimeLocator&version=0.5.5
                    
Install as a Cake Tool

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.)

Licence

WoofWare.DotnetRuntimeLocator is licensed to you under the MIT licence, a copy of which can be found at LICENSE.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.5.5 0 9/10/2026
0.5.4 214 9/8/2026
0.5.3 66 9/8/2026
0.5.2 104 8/25/2026
0.5.1 107 8/8/2026
0.4.2 351 10/3/2025
0.4.1 492 9/16/2025
0.3.2 10,226 5/16/2025
0.3.1 342 5/16/2025
0.2.1 341 5/16/2025
0.1.12 4,980 3/21/2025
0.1.11 1,631 11/24/2024
0.1.10 183 11/24/2024
0.1.9 3,224 6/17/2024
0.1.8 203 6/17/2024
0.1.7 193 6/17/2024
0.1.6 211 6/17/2024
0.1.5 223 6/16/2024
0.1.4 867 6/9/2024
0.1.3 340 6/9/2024
Loading failed