"GetPackageDirectory" task failing unexpectedly
See original GitHub issueInformation
cc @danmoseley Linked to https://github.com/dotnet/performance/issues/2564 Starting late 08/15, when building for “Runtime=NativeAOT 7.0” with “Toolchain=ILCompiler 7.0.0-*”, our builds started hitting “The ‘GetPackageDirectory’ task failed unexpectedly”. This is different from behavior using the same settings the day before. We have public logs demonstrating the error: https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-performance-refs-pull-2549-merge-ada34367314d40efb9/Partition0/1/console.e9e4522d.log?helixlogtype=result and demonstrating a successful build https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-performance-refs-heads-main-0f44758c7ce64b77aa/Partition1/1/console.7e903502.log?helixlogtype=result. Looking around I noticed the task area was updated around the same time the errors started showing up in our builds (https://github.com/dotnet/sdk/pull/27159). Could this potentially be related to those changes @LakshanF?
Exception/Failure
[2022/08/17 17:49:24][INFO] Build FAILED.
[2022/08/17 17:49:24][INFO] /home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64/sdk/7.0.100-rc.2.22417.1/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(255,5): error MSB4018: The "GetPackageDirectory" task failed unexpectedly. [/home/helixbot/work/B17209D2/w/A819091D/e/artifacts/bin/MicroBenchmarks/Release/net7.0/a55d87f3-9864-4d0f-b7cf-0909db2b0ba6/BenchmarkDotNet.Autogenerated.csproj]
[2022/08/17 17:49:24][INFO] /home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64/sdk/7.0.100-rc.2.22417.1/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(255,5): error MSB4018: System.ArgumentException: '7.0.0-*' is not a valid version string. (Parameter 'value') [/home/helixbot/work/B17209D2/w/A819091D/e/artifacts/bin/MicroBenchmarks/Release/net7.0/a55d87f3-9864-4d0f-b7cf-0909db2b0ba6/BenchmarkDotNet.Autogenerated.csproj]
[2022/08/17 17:49:24][INFO] /home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64/sdk/7.0.100-rc.2.22417.1/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(255,5): error MSB4018: at NuGet.Versioning.NuGetVersion.Parse(String value) [/home/helixbot/work/B17209D2/w/A819091D/e/artifacts/bin/MicroBenchmarks/Release/net7.0/a55d87f3-9864-4d0f-b7cf-0909db2b0ba6/BenchmarkDotNet.Autogenerated.csproj]
[2022/08/17 17:49:24][INFO] /home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64/sdk/7.0.100-rc.2.22417.1/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(255,5): error MSB4018: at Microsoft.NET.Build.Tasks.GetPackageDirectory.ExecuteCore() [/home/helixbot/work/B17209D2/w/A819091D/e/artifacts/bin/MicroBenchmarks/Release/net7.0/a55d87f3-9864-4d0f-b7cf-0909db2b0ba6/BenchmarkDotNet.Autogenerated.csproj]
[2022/08/17 17:49:24][INFO] /home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64/sdk/7.0.100-rc.2.22417.1/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(255,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/home/helixbot/work/B17209D2/w/A819091D/e/artifacts/bin/MicroBenchmarks/Release/net7.0/a55d87f3-9864-4d0f-b7cf-0909db2b0ba6/BenchmarkDotNet.Autogenerated.csproj]
[2022/08/17 17:49:24][INFO] /home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64/sdk/7.0.100-rc.2.22417.1/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(255,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/helixbot/work/B17209D2/w/A819091D/e/artifacts/bin/MicroBenchmarks/Release/net7.0/a55d87f3-9864-4d0f-b7cf-0909db2b0ba6/BenchmarkDotNet.Autogenerated.csproj]
[2022/08/17 17:49:24][INFO] /home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64/sdk/7.0.100-rc.2.22417.1/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(255,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/home/helixbot/work/B17209D2/w/A819091D/e/artifacts/bin/MicroBenchmarks/Release/net7.0/a55d87f3-9864-4d0f-b7cf-0909db2b0ba6/BenchmarkDotNet.Autogenerated.csproj]
Dotnet Info
[2022/08/17 17:48:11][INFO] $ dotnet --info
[2022/08/17 17:48:12][INFO] .NET SDK:
[2022/08/17 17:48:12][INFO] Version: 7.0.100-rc.2.22417.1
[2022/08/17 17:48:12][INFO] Commit: f3da421a6e
[2022/08/17 17:48:12][INFO]
[2022/08/17 17:48:12][INFO] Runtime Environment:
[2022/08/17 17:48:12][INFO] OS Name: centos
[2022/08/17 17:48:12][INFO] OS Version: 7
[2022/08/17 17:48:12][INFO] OS Platform: Linux
[2022/08/17 17:48:12][INFO] RID: centos.7-x64
[2022/08/17 17:48:12][INFO] Base Path: /home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64/sdk/7.0.100-rc.2.22417.1/
[2022/08/17 17:48:12][INFO]
[2022/08/17 17:48:12][INFO] Host:
[2022/08/17 17:48:12][INFO] Version: 7.0.0-rc.1.22411.12
[2022/08/17 17:48:12][INFO] Architecture: x64
[2022/08/17 17:48:12][INFO] Commit: f52d8c59bb
[2022/08/17 17:48:12][INFO]
[2022/08/17 17:48:12][INFO] .NET SDKs installed:
[2022/08/17 17:48:12][INFO] 7.0.100-rc.2.22417.1 [/home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64/sdk]
[2022/08/17 17:48:12][INFO]
[2022/08/17 17:48:12][INFO] .NET runtimes installed:
[2022/08/17 17:48:12][INFO] Microsoft.AspNetCore.App 7.0.0-rc.1.22415.4 [/home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64/shared/Microsoft.AspNetCore.App]
[2022/08/17 17:48:12][INFO] Microsoft.NETCore.App 7.0.0-rc.1.22411.12 [/home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64/shared/Microsoft.NETCore.App]
[2022/08/17 17:48:12][INFO]
[2022/08/17 17:48:12][INFO] Other architectures found:
[2022/08/17 17:48:12][INFO] None
[2022/08/17 17:48:12][INFO]
[2022/08/17 17:48:12][INFO] Environment variables:
[2022/08/17 17:48:12][INFO] DOTNET_ROOT [/home/helixbot/work/B17209D2/w/A819091D/e/tools/dotnet/x64]
[2022/08/17 17:48:12][INFO]
[2022/08/17 17:48:12][INFO] global.json file:
[2022/08/17 17:48:12][INFO] Not found
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top GitHub Comments
The fix is in the runtime repo, https://github.com/dotnet/runtime/pull/74591
We are no longer hitting the issue with the fix in, closing! 🥳