'system.security.cryptography.protecteddata ,this error I'm getting in code build time. I'm was added Nuget package related to cryptography

Error MSB3027 Could not copy "C:\Users\surendra.reddy.nuget\packages\system.security.cryptography.protecteddata\4.5.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "bin\Debug\netcoreapp3.1\bin\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Exceeded retry count of 10. Failed. PublishReportNotification C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 4679



Solution 1:[1]

This Error arrives because of the exceeded count of the retry method. MSBuild has certain number of limit to copy the file. If that limit has exceeded, this error will occur.

This will also occur when the destination file is in use by another program.

For example: If you try to move the program from one to another destination when running, It will give MSB3027 The detailed problem will be here.

Solution 2:[2]

I had the same issue. It was because the name of the destination of the project was too long. If you have something like D:\someFolder\SomeFolder\AnotherFolder\Folder\Folder\etc\myApp, Visual Studio would throw this error. There is a restriction on the destination length.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Arun_Raja1
Solution 2 AchoVasilev