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

[Bug]: Cannot create a Project object with the long path prefix \\?\. #10645

Open
MarkKharitonov opened this issue Sep 11, 2024 · 0 comments
Open
Assignees
Labels

Comments

@MarkKharitonov
Copy link

Issue Description

Trying to create a Project object from a long path when using .NET Framework does not work - fails with various exceptions.

Steps to Reproduce

The following unit test passes, when it should fail on the first or second assertion:

    [Test]
    public void ProjectPath()
    {
        var path = ... ; // some project path 255 characters long
        Assert.That(() => new Project(path, new Dictionary<string, string>(), null), Throws.Exception);
        Assert.That(() => new Project(@"\\?\" + path, new Dictionary<string, string>(), null), Throws.Exception);
        path = ... ; // a shorter project path
        _ = new Project(path, new Dictionary<string, string>(), null);
    }

An important detail - the code must be targeting .NET Framework.

Expected Behavior

Using a long path should work. At least with the \\?\ prefix.

Actual Behavior

Either long path variant result in an exception. Albeit a different one.

Analysis

No response

Versions & Configurations

No response

@rainersigwald rainersigwald self-assigned this Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants