Maybe someone of you can help me by my problem. At first to make clear this problem is a known problem on stackoverflow and I read all the solutions for that problem and tried them out but this do not solved my problem.
Problem:
MSB3027: Could not copy "C:\Users\SpecificUser.nuget\packages\opentap\9.10.4\build\payload\Dependencies\System.Runtime.InteropServices.RuntimeInformation.4.0.2.0\System.Runtime.InteropServices.RuntimeInformation.dll" to "bin\Debug\Dependencies\System.Runtime.InteropServices.RuntimeInformation.4.0.2.0\System.Runtime.InteropServices.RuntimeInformation.dll". Exceeded retry count of 10. Failed.
Due to that error I can't build my solution no matter if I build in debug mode or release mode.
Try to Solve
- At first I simply tried to clean the project and rebuild it
- I also tried to clean the solution and rebuild the solution
- At next I unloaded the project and reloaded it with and without dependencies
- Than I tried to close VS2019 and reopened the project in combination with the previous parts
- After that I tried to uncheck "allows NuGet to automatically check for missing packages during build in Visual Studio" (Debug -> options)
- Than I tried to build the project with all combinations of above
- Than I tried the same but with Clear All NuGet Cache(s)
- Than I tried to insert a prebuild action
if exist "$(TargetPath).locked" del "$(TargetPath).locked"
if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"
This throw me an error MSB3073 but without an error message and the description says:
MSB3073: The command "if exist "C:\Users\SpecificUser\source\repos\ProjectName\bin\Debug\ProjectName.dll.locked" del "C:\Users\SpecificUser\source\repos\ProjectName\bin\Debug\ProjectName.dll.locked"
- Also, I made sure that the output path is clear
- At next I tried to delete the bin folder and the obj folder.
All tis step have no success.
Additional Problem Sometimes the dependencies would not load. For that I tried to reinstall them or reload the dependencies. Sometimes it works but usually not. Also, some References such as OpenTAP or Microsoft.CSharp has a yellow rectangular inside the symbol yellow rectangular at reference
Used Recourses
Tried Solutions from StackOverflow
- Could not copy "obj\Debug{project}.dll" to "bin{project}.dll"
- visual studio 2013 Could not copy "obj\Debug.dll" to "bin\Debug.dll"
- Error: Cannot access file bin/Debug/... because it is being used by another process
- Unable to Copy File "*\bin\debug*.dll" to "bin*.dll" in Visual Studio
- Error MSB3027: Could not copy "C:\pagefile.sys" to "bin\roslyn\pagefile.sys". Exceeded retry count of 10. Failed
Maybe someone can help me with my issue \^o^/