Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet restore erroring on NuGet.Config being used by another process #13937

Open
cataggar opened this issue Nov 18, 2024 · 7 comments
Open

dotnet restore erroring on NuGet.Config being used by another process #13937

cataggar opened this issue Nov 18, 2024 · 7 comments
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Area:Logging Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Type:Bug

Comments

@cataggar
Copy link

NuGet Product Used

dotnet.exe

Product Version

dotnet sdk 9.0.100

Worked before?

dotnet sdk 8.0.401

Impact

I'm unable to use this version

Repro Steps & Context

Here is the internal pull request to reproduce.

I am often getting this error even with --disable-parallel:

~/ms/avs/src/conveyor/conveyor> dotnet build --disable-parallel
C:\Program Files\dotnet\sdk\9.0.100\NuGet.targets(751,5): error :
Unexpected failure reading NuGet.Config. Path: 'C:\Users\cataggar\AppData\Roaming\NuGet\NuGet.Config'.
The process cannot access the file 'C:\Users\cataggar\AppData\Roaming\NuGet\NuGet.Config' because it is being used by another process.

Verbose Logs

No response

@nguerrera
Copy link

nguerrera commented Nov 19, 2024

I am seeing this as well. It also seems to impact 8.0.404, but not 8.0.403.

It is not 100% reproducible for me, but happening often, and only recently.

@tmat
Copy link

tmat commented Nov 19, 2024

Perhaps nuget should include list of processes that have the paths open in the exception message. See
dotnet/roslyn#75946
dotnet/runtime#109927

@nguerrera
Copy link

If I hit this again today, I will try to debug to provide more info.

@nguerrera
Copy link

I can't explain it, but this hasn't happened to me in the last few days while it was happening a lot before. Possibly something that was locking the files like VS got an update?

@jeffkl
Copy link
Contributor

jeffkl commented Nov 25, 2024

I am not aware of any changes in this area of the code in the 6.12 release. I wonder if its an anti-malware process that's locking the file?

@jeffkl jeffkl added WaitingForCustomer Applied when a NuGet triage person needs more info from the OP and removed Triage:Untriaged labels Nov 25, 2024
@tmat
Copy link

tmat commented Nov 25, 2024

@jeffkl Could you implement #13937 (comment)? Might help with diagnostics.

@jeffkl
Copy link
Contributor

jeffkl commented Nov 25, 2024

We can add it to our backlog for sure.

@nkolev92 nkolev92 added Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Area:ErrorHandling warnings and errors/log messages & related error codes. Area:Logging and removed WaitingForCustomer Applied when a NuGet triage person needs more info from the OP labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Area:Logging Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Type:Bug
Projects
None yet
Development

No branches or pull requests

5 participants