NuGet / Home

Repo for NuGet Client issues
Other
1.48k stars 249 forks source link

Msbuild lock #11584

Open Forgind opened 2 years ago

Forgind commented 2 years ago

Issue moved from dotnet/msbuild#7384


From @VasekLexa on Thursday, February 10, 2022 10:56:49 AM

Issue Description

Steps to Reproduce

This happens from time to time on our CI server. Msbuild process does not end, it locks some log file. Last line in the log is: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(564,5): warning MSB4220: Waiting for the currently executing task "GetRestoreSettingsTask" to cancel.

Expected Behavior

Actual Behavior

Analysis

Versions & Configurations

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin>msbuild --version Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

17.0.0.52104

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin>dotnet --info .NET SDK (reflecting any global.json): Version: 6.0.101 Commit: ef49f6213a

Runtime Environment: OS Name: Windows OS Version: 10.0.17763 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.101\

Attach a binlog

dump

Forgind commented 2 years ago

Issue moved from dotnet/msbuild#7384


From @BenVillalobos on Thursday, February 10, 2022 5:25:33 PM

MSBuild Team Triage: This looks like a NuGet issue. Routing over to nuget team

kartheekp-ms commented 2 years ago

Looking at https://github.com/NuGet/Home/issues/4517, I think GetRestoreSettingsTask task should also implement ICancelable interface.

https://docs.microsoft.com/en-us/dotnet/api/microsoft.build.framework.icancelabletask?view=msbuild-17

Forgind commented 2 years ago

Looking at #4517, I think GetRestoreSettingsTask task should also implement ICancelable interface.

https://docs.microsoft.com/en-us/dotnet/api/microsoft.build.framework.icancelabletask?view=msbuild-17

Sounds like the right fix to me.

VasekLexa commented 2 years ago

This issue hapens every day, sometimes several times a day on our CI pipeline. We always have to restart server to resolve this. Could you increase priority of this issue?

zivkan commented 2 years ago

@VasekLexa thanks for the comment. Please also upvote the original comment, to help our triage process: https://github.com/NuGet/Home/blob/dev/Issue-Triage-Policy.md#up-voting-a-feature-requestbug