-
Notifications
You must be signed in to change notification settings - Fork 722
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
Add Prefix in TestContext.AddTestAttachment for long file paths #4665
Conversation
@dotnet-policy-service agree |
Thanks for your contribution @Meet2rohit99 |
Thanks @stevenaw! Added test. |
…rk in TestContextTests.cs
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.
See comments in PR.
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.
Thanks. Looking good now. Builds are all green.
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.
Thanks for your contribution @Meet2rohit99 ! This looks good to me too
Fixes #4353.
For .NetFramework, with file path greater than 260, TestContext.AddTestAttachment was throwing attachment not found exception. As suggested prefixing "\\?\" with absolute path works fine. The issue is with .NET Framework variants but not on .NET Core3.1, .NET6, or .NET7. Therefore adding prefix only in case of .NetFramework