Skip to content

Issue with ToFullPathInCorrectCase #651

@PetSerAl

Description

@PetSerAl

I have my work folder on subst drive:

subst.exe M: C:\Some\Other\Path

Suppose I have M:\Project\src\Project.csproj and I want to create M:\Project\Project.sln. I expect, that solution file will contain relative path src\Project.csproj, but due to usage GetFinalPathNameByHandle here:

StringBuilder stringBuilder = new StringBuilder(GetFinalPathNameByHandle(stream.SafeFileHandle, null, 0, 0));
GetFinalPathNameByHandle(stream.SafeFileHandle, stringBuilder, stringBuilder.Capacity, 0);

the path expanded to C:\Some\Other\Path\Project\src\Project.csproj. That prevent SlnGen to see it as relative to solution file M:\Project\Project.sln and full path included in solution. That in turn prevent VS Code C# extension to recognize M:\Project\src\Project.csproj as part of solution and provide proper syntax highlighting, completion, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions