Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Algorithm for Resolving DotNet host path to Fake.DotNet.Cli from SdkAssemblyResolver #2644

Open
yazeedobaid opened this issue Jan 30, 2022 · 1 comment

Comments

@yazeedobaid
Copy link
Collaborator

Description

Per the fix for SDK assembly resolver for FAKE runner in #2638, the added algorithm for resolving dotnet host path should be also used in Fake.DotNet.Cli module which interact with DotNet host.

Specifically in the findPossibleDotnetCliPaths method:

let findPossibleDotnetCliPaths dotnetCliDir = seq {
let fileName = if Environment.isUnix then "dotnet" else "dotnet.exe"
yield!
ProcessUtils.findFilesOnPath "dotnet"
|> Seq.filter File.Exists
|> Seq.filter (fun dotPath -> dotPath.EndsWith fileName)
let userInstalldir = defaultUserInstallDir </> fileName
if File.exists userInstalldir then yield userInstalldir
let systemInstalldir = defaultSystemInstallDir </> fileName
if File.exists systemInstalldir then yield systemInstalldir
match dotnetCliDir with
| Some userSetPath ->
let defaultCliPath = userSetPath @@ fileName
match File.Exists defaultCliPath with
| true -> yield defaultCliPath
| _ -> ()
| None -> () }

@github-actions
Copy link

Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant