Open travnick opened 9 months ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
@rainersigwald @JeremyKuhne Do you have insights as to why this task is failing due to the long path?
Does the docker image have the Windows long-path opt-in stuff set? Does the host machine?
I see it (HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled
) for both host and the container disabled.
Describe the bug
I'm receiving
error MSB4018: The "GenerateStaticWebAsssetsPropsFile" task failed unexpectedly.
while running a build of my mixed C++/.NET solution within docker image withBuildTools
17.4.5
Build log:The whole build succeeds on my local machine, where path to the project is like
D:\xxxxxx\xxxxx\xxxx-xxxxx\xxxxxxxxx_xxxxx\xxx_xxxxx_xxxxxxxxxxxxxxxxxxxx\xxx_xxxxx_xxxxxxxxxxxxxxxxxxxx.csproj
instead ofC:\atlassian-bitbucket-pipelines-runner\temp\00000000-0000-0000-0000-000000000000\0000000000000\build\xxxxxxxxx_xxxxx\xxx_xxxxx_xxxxxxxxxxxxxxxxxxxx\xxx_xxxxx_xxxxxxxxxxxxxxxxxxxx.csproj
on CII see few explanations that this is the issue of having a long path. But please provide official details about affected versions/fixed versions/workaround.
https://github.com/andrewlock/asp-dot-net-core-in-action-3e#book-project-for-aspnet-core-in-action-third-edition https://stackoverflow.com/questions/74403186/the-generatestaticwebasssetspropsfile-task-failed-unexpectedly https://www.youtube.com/watch?v=GtqQn36onAg
To Reproduce
Exceptions (if any)
Further technical details
mcr.microsoft.com/windows:ltsc2019
BuildTools 17.4.5
dotnet --info
Runtime Environment: OS Name: Windows OS Version: 10.0.17763 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.103\
Host: Version: 7.0.3 Architecture: x64 Commit: 0a2bda10e8
.NET SDKs installed: 2.2.402 [C:\Program Files\dotnet\sdk] 3.1.302 [C:\Program Files\dotnet\sdk] 3.1.426 [C:\Program Files\dotnet\sdk] 6.0.309 [C:\Program Files\dotnet\sdk] 6.0.407 [C:\Program Files\dotnet\sdk] 7.0.103 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables: Not set
global.json file: Not found
Learn more: https://aka.ms/dotnet/info
Download .NET: https://aka.ms/dotnet/download