You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DirectoryNotFoundException when extracting downloaded .NET 9 SDK by Powershell in the UseDotNet2Task
Environment type (Please select at least one enviroment where you face this issue)
Self-Hosted
Microsoft Hosted
VMSS Pool
Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows
Relevant log output
Zu installierendes Tool: .NET Core sdk Version 9.0.100-preview.1.24101.2.
Version 9.0.100-preview.1.24101.2 in Kanal "9.0" für benutzerseitig angegebene Versionsspezifikation gefunden: 9.0.100-preview.1.24101.2
Die Version 9.0.100-preview.1.24101.2 wurde nicht im Cache gefunden.
URL zum Herunterladen von .NET Core sdk, Version 9.0.100-preview.1.24101.2 wird abgerufen.
Die Betriebssystemplattform wird ermittelt, um das richtige Downloadpaket für das Betriebssystem zu finden.
[command]C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& 'C:\Users\WlodarczykD\Desktop\Agent\_work\_tasks\UseDotNet_b0ce7256-7898-45d3-9cb5-176b752bfea6\2.0.7\externals\get-os-platform.ps1'"
Primary:win-x64
Erkannte Plattform (primär): win-x64
Wird heruntergeladen: https://download.visualstudio.microsoft.com/download/pr/4c55bc67-e478-4fdc-abe3-08b8dd64f4e4/9cf46c3018f477a93a8498850e6c122b/dotnet-sdk-9.0.100-preview.1.24101.2-win-x64.zip
Das heruntergeladene Paket C:\Users\WlodarczykD\Desktop\Agent\_work\_temp\a99876a3-aa84-433e-bf83-64fc670a2c62 wird extrahiert.
Archiv wird extrahiert
[command]C:\Windows\system32\chcp.com 65001
Active code page: 65001
[command]C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('C:\Users\WlodarczykD\Desktop\Agent\_work\_temp\a99876a3-aa84-433e-bf83-64fc670a2c62', 'C:\Users\WlodarczykD\Desktop\Agent\_work\_temp\a846e048-8cb7-48a7-b9a1-6592eece6719')"
Exception calling "ExtractToDirectory" with "2" argument(s): "Could not find a part of the path 'C:\Users\WlodarczykD\Desktop\Agent\_work\_temp\a846e048-8cb7-48a7-b9a1-6592eece6719\sdk\9.0.100-preview.1.24101.2\DotnetTools\dotnet-watch\9.0.100-preview.1.24101.1\tools\net9.0\any\BuildHost-net472\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe.config'."
At line:1 char:111
+ ... catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('C:\U ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : DirectoryNotFoundException##[error]Fehler beim Installieren der Version 9.0.100-preview.1.24101.2 in Pfad "C:\Users\WlodarczykD\Desktop\Agent\_work\_tool/dotnet". Fehler: Fehler beim Extrahieren des heruntergeladenen Pakets. Fehler: Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1##[section]Abschließen: Install .NET9
@bartvanhoey, thank you for bringing this to our attention.
It seems the issue with the UseDotNet@2 task may stem from an underlying environment
or background settings that cannot be identified explicitly from the error output.
You have linked your problem in the related issue #10879 and I have found another one issue #7692.
The similarity between your issue and issue #10879 seems remarkably notable:
both error outputs contain the exception type DirectoryNotFoundException
I think that it might related to the long path, despite the ExtractToDirectory method has the distinct exception PathTooLongException
Could you consider relocating your agent to the root of C drive, or running a specific cmd in Powershell with elevated privileges?
New issue checklist
Task name
UseDotNet@2
Task version
No response
Issue Description
DirectoryNotFoundException when extracting downloaded .NET 9 SDK by Powershell in the UseDotNet2Task
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows
Relevant log output
Full task logs with system.debug enabled
dd
Repro steps
The text was updated successfully, but these errors were encountered: