My system is keeping a lock on some DLLs, causing me to exit and reopen visual studio in order to continue work.
After running and exiting my C# XAF 24.1.5 Winforms application in the VS 17.11.2.
On trying to Clean the Solution.
I get:
warning MSB3061: Unable to delete file `"C:\Users\kirst\source\repos\MyXAFWin\bin\Debug\net8.0-windows\Castle.Core.dll". The process cannot access the file 'C:\Users\kirst\source\repos\MyXAFWin\bin\Debug\net8.0-windows\Castle.Core.dll' because it is being used by another process. The file is locked by: "Microsoft Visual Studio 2022 (2388)"
The same message for Microsoft.EntityFrameworkCore.dll and Microsoft.Data.SqlClient.dll
After a while (about 20 minutes) the error goes away.
I consider question is not a duplicate of this question because it is happening when I clean the project and on the referenced dlls rather than the .exe