Skip to content

Windows long paths support #4913

@JamieMagee

Description

@JamieMagee

Description

When attempting to checkout https://github.com/Azure/azure-sdk-for-net into a subdirectory on a Windows 2019 based runner I receive many error messages like the following:

error: unable to create file sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/tests/SessionRecords/CognitiveServices.Tests.CognitiveServicesAccountTests/CognitiveServicesAccountCreateAllApisTest.json: Filename too long

Please enable long paths support when building Windows images

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11
  • Windows Server 2016
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Environment: windows-2019
Version: 20220116.1

https://github.com/microsoft/component-detection/runs/4874590492?check_suite_focus=true

Is it regression?

No

Expected behavior

No response

Actual behavior

No response

Repro steps

  1. Try and check out a repository to a path with more than 260 characters 1

Footnotes

  1. https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions