复制 system.security.cryptography.protecteddata 失败

问题描述 投票:0回答:2

我在构建期间收到此错误。我添加了与密码学相关的Nuget包:

错误 MSB3027 无法复制“C:\Users\surendra.reddy.nuget\packages\system.security.cryptography.protecteddata .5.0 untimes\win\lib etstandard2.0\System.Security.Cryptography.ProtectedData.dll”到“bin\Debug 等coreapp3.1中 untimes\win\lib etstandard2.0\System.Security.Cryptography.ProtectedData.dll”。重试次数超过 10。失败。PublishReportNotification C:\Program Files (x86)\Microsoft Visual Studio�9\Community\MSBuild\Current\Bin\Microsoft.Common .CurrentVersion.targets 4679

我该如何解决这个问题?

c# api
2个回答
1
投票

我也有同样的问题。这是因为该项目的目的地名称太长。如果您有类似 D:\someFolder\SomeFolder\AnotherFolder\Folder\Folder tc\myApp 的内容,Visual Studio 会抛出此错误。目的地长度有限制。


0
投票

此错误是由于重试方法超出次数而出现。

MSBuild
复制文件有一定数量限制。 如果超过该限制,就会出现此错误。

当目标文件被其他程序使用时也会发生这种情况。

例如:如果您在运行时尝试将程序从一个目的地移动到另一个目的地,它将给出

MSB3027
详细的问题将在这里

© www.soinside.com 2019 - 2024. All rights reserved.