Replace realpath P/Invoke with File.ResolveLinkTarget
Open
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