mirror of
https://github.com/Smaug123/WoofWare.DotnetRuntimeLocator
synced 2025-10-05 07:18:40 +00:00
7bccc10aab4c08d1aad45a53dea17bf45856b6c5
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 2.4.0 to 3.0.0.
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](e8998f9491...977bb373ed
)
---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
dependency-version: 3.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.)
Languages
C#
80.6%
F#
13.4%
Nix
6%