Skip to content

Conversation

@jozkee
Copy link
Member

@jozkee jozkee commented Jul 28, 2022

Backport of #69150

Customer Impact

Customer reported. Customers who create Symbolic Links using the new APIs introduced in 6.0 will face silent failures when Developer mode is disabled in Windows settings.

File.Create("my-file.txt";).Dipose();

// Having developer mode disabled on Windows, this will silently fail.
FileSystemInfo linkInfo = File.CreateSymbolicLink("my-link", "my-file.txt"); 

Console.WriteLine($"Link exsts: {linkInfo.Exists}"); // prints false when it should’ve thrown above.

Testing

Customer confirmed and reported that issues is fixed, and it no longer fails silently.
The change has been in-place for months on .NET 7 with no failures involved.

Risk

Low, changes are minimal and self-evidently correct.

)

* CreateSymbolicLink PInvoke retval must be marshalled as U1

* Fix redundant invocations of Environment.OSVersion.Version
@jozkee jozkee added Servicing-consider Issue for next servicing release review area-System.IO labels Jul 28, 2022
@jozkee jozkee added this to the 6.0.x milestone Jul 28, 2022
@jozkee jozkee requested review from adamsitnik and jeffhandley July 28, 2022 14:57
@jozkee jozkee self-assigned this Jul 28, 2022
@ghost
Copy link

ghost commented Jul 28, 2022

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #69150

Customer Impact

Customers who create Symbolic Links using the new APIs introduced in 6.0 will face silent failures when Developer mode is disabled in Windows settings.

File.Create("my-file.txt";).Dipose();

// Having developer mode disabled on Windows, this will silently fail.
FileSystemInfo linkInfo = File.CreateSymbolicLink("my-link", "my-file.txt"); 

Console.WriteLine($"Link exsts: {linkInfo.Exists}"); // prints false when it should’ve thrown above.

Testing

Customer confirmed and reported that issues is fixed, and it no longer fails silently.
The change has been in-place for months on .NET 7 with no failures involved.

Risk

Low, changes are minimal.

Author: Jozkee
Assignees: Jozkee
Labels:

Servicing-consider, area-System.IO

Milestone: 6.0.x

@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jul 28, 2022
@rbhanda rbhanda modified the milestones: 6.0.x, 6.0.9 Jul 28, 2022
@jozkee
Copy link
Member Author

jozkee commented Jul 28, 2022

Failing runtime leg is an error on System.Diagnostics.Tests.PerformanceCounterTests, filed #73019.

runtime-staging shows many errors on
Build tvOSSimulator x64 Release AllSubsets_Mono,
Build iOSSimulator x64 Release AllSubsets_Mono,
Build Android x86 Release AllSubsets_Mono
and Build Browser wasm release Browser_wasm_Windows.

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Contributor

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tactics approved.
Correct milestone applied.
CI failures are unrelated.
Area owner signed off.
No OOB package authoring changes needed (affecting installer and Common code).
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit 9180526 into dotnet:release/6.0 Aug 11, 2022
@carlossanlop carlossanlop deleted the backport_6.0/symlink_marshalas branch August 11, 2022 20:24
@ghost ghost locked as resolved and limited conversation to collaborators Sep 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.IO Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants