-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Update native File.Exists #9223
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
Conversation
@JaynieBai Could you comment on this PR and fill the description? |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looking good!
One comment left probably nit
src/Build/BackEnd/Components/RequestBuilder/IntrinsicTasks/MSBuild.cs
Outdated
Show resolved
Hide resolved
It looks like the root of the problem here is that our custom Windows-only implementation of msbuild/src/Framework/NativeMethods.cs Lines 1725 to 1731 in 053feb0
BCL API accepts paths like @JaynieBai, can you please check why exactly |
I Find FileSystems.Default.FileExists calls the unmanage function
.NET Framework Output
.Net Output
|
I agree with @ladipro here that we need to make sure a change happens on a correct abstraction layer and isolated only to the failing scenario, given the perf concerns. @rainersigwald do you have some knowledge why we have a custom Windows-only implementation of File.Exists here? |
Synced with @AR-May on this - our conclusion: The root of the problem is in our custom implementation of FileExists (
|
Fixes #4272
Context
The root of the problem here is that our custom Windows-only implementation of File.Exists behaves differently than the regular one in BCL
Changes Made
Rewrite the WindowsFileSystem.FileExists implementation like this:
Testing
ProjectItemSpecTooLong()
Notes