dotnet / dotnet/sdk

Replace realpath P/Invoke with File.ResolveLinkTarget

Open
#52,458 0 comments 0 reactions 0 assignees View on GitHub
Area-SdkResolvers untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

`src\Resolvers\Microsoft.DotNet.NativeWrapper\EnvironmentProvider.cs` uses `realpath` P/Invoke to resolve symlink to `dotnet` on Unix. Use `File.ResolveLinkTarget` API instead.

It seems like symlink should be resolved on Windows as well.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading src\Resolvers\Microsoft.DotNet.NativeWrapper\EnvironmentProvider.cs and trace how it resolves the dotnet symlink on Unix. Replace the realpath P/Invoke with File.ResolveLinkTarget, then verify that symlink resolution also works on Windows as requested and run the relevant existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.