c# - 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中损坏的东西吗?
如何解决“存储库会签有效期已过。”?
解决方案
我最近也开始发生这种情况(在 macOS Big Sur dotnet --version
11.5.2、5.0.100 上)。我看到如下错误消息:
警告 NU3028:[...] 作者主签名的时间戳发现了一个链构建问题:ExplicitDistrust:此策略的信任设置被设置为拒绝。
错误 NU3037:[...] 存储库会签有效期已过。
警告 NU3037:[...] 存储库会签有效期已过。
升级到 .NET SDK 的最新版本修复了它(dotnet --version
当前显示为 5.0.401)。
推荐阅读
- jquery - 将事件添加到已被插件绑定的元素的正确技术?
- python - excel CSV文件可以注入宏吗?
- vba - VBA - 如何通过按下命令按钮插入字符
- python-3.6 - 一维列表的浅拷贝
- javascript - React - 更改可以在任何地方打开的模式的 URL
- c# - 当控件位于面板内时跟踪 LocationChanged 和 SizeChanged 用户控件事件
- python - 如何在 Django/Rest FrameWork 中修改 field_to_native
- javascript - 在 React 中解析日期对象
- powershell - 如何在 UIAutomation 中访问 UIAPane 项
- sql-server - SQL Server 存储过程不在计划缓存或 Profiler 中