dotnet-core-file-upload
dotnet-core-file-upload copied to clipboard
Build Failed on the backend webAPI project -
I downloaded this and tried to apply add-migration on the backend webAPI project. It isn't working. I am getting 2 errors. The errors I am getting are:
-
Could not copy "C:\Users\home.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "bin\Debug\net6.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Exceeded retry count of 10. Failed. UploadFilesServer C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets
-
Unable to copy file "C:\Users\home.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "bin\Debug\net6.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Could not find a part of the path 'bin\Debug\net6.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. UploadFilesServer C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets
My Visual Studio version information is--> Microsoft Visual Studio Professional 2022 (64-bit), Version 17.9.4 What is the fix for the above two errors?
I just downloaded the StarterProject, unzipped it, and run it. After I've executed the Update-Database command to apply existing migration file, everything worked well. So, there are no issues. I don't know why you have that issue. If you downloaded the zip file, try to unzip the content closest to the HDD Drive (C, or D, or whatever you have). Maybe the length of the path is the issue. Also, if you are cloning this repo, place it, again, closer to the root.
Hi Marinko,
Yes, you were correct. Issue with Visual Studio 2022. I unzipped the packages and kept it closest to the drive interms of path, instead of placing it in any other folder or subfolders. Built the project and ran it. It ran okay this time. It was happening previously because the restoration path was becoming too long cuz I kept the project in subfolders in my drive.
I apologize. Nothing wrong with your project. You can close this issue pronto!