首页 > 解决方案 > dotnet restore 在 macos 上是否损坏?

问题描述

这最近才刚刚开始发生。

dotnet --version
5.0.104

macOS Big Sur 版本 11.6

当我跑步时

dotnet restore
  Determining projects to restore...
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Security.Cryptography.ProtectedData 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Windows.Extensions 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Security.Principal.Windows 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Security.Permissions 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Configuration.ConfigurationManager 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Security.Principal.Windows 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Security.Permissions 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Windows.Extensions 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Security.Principal.Windows 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Security.Cryptography.ProtectedData 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Configuration.ConfigurationManager 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Security.Permissions 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Security.Principal.Windows 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Security.Cryptography.ProtectedData 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Configuration.ConfigurationManager 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Security.Permissions 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Windows.Extensions 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Configuration.ConfigurationManager 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Windows.Extensions 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Security.Cryptography.ProtectedData 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Drawing.Common 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Drawing.Common 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Drawing.Common 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Drawing.Common 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'Microsoft.Win32.SystemEvents 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'Microsoft.Win32.SystemEvents 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'Microsoft.Win32.SystemEvents 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'Microsoft.Win32.SystemEvents 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Security.AccessControl 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Security.AccessControl 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'System.Security.AccessControl 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'System.Security.AccessControl 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'Microsoft.NETCore.Platforms 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'Microsoft.NETCore.Platforms 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/Users/xxx/Work/mvc/mvc.csproj : warning NU3028: Package 'Microsoft.NETCore.Platforms 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
/Users/xxx/Work/mvc/mvc.csproj : error NU3037: Package 'Microsoft.NETCore.Platforms 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature validity period has expired.
  Failed to restore /Users/xxx/Work/mvc/mvc.csproj (in 753 ms).
  1 of 2 projects are up-to-date for restore.

这是在nuget中损坏的东西吗?

如何解决“存储库会签有效期已过。”?

标签: c#nuget

解决方案


我最近也开始发生这种情况(在 macOS Big Sur dotnet --version11.5.2、5.0.100 上)。我看到如下错误消息:

警告 NU3028:[...] 作者主签名的时间戳发现了一个链构建问题:ExplicitDistrust:此策略的信任设置被设置为拒绝。

错误 NU3037:[...] 存储库会签有效期已过。

警告 NU3037:[...] 存储库会签有效期已过。

升级到 .NET SDK 的最新版本修复了它(dotnet --version当前显示为 5.0.401)。


推荐阅读