每次我尝试从用于Mac的rider的“程序包”选项卡更新nuget时,都会收到以下消息:
“ [通知] [安装]安装失败(项目:xxx,软件包: Xamarin.Forms v4.1.0.581479)程序包还原失败。滚回来 软件包更改为“ xxx”。
打开“日志”标签,这似乎是来自“ https://api.nuget.org/v3/index.json”的软件包的签名问题。
我正在macos Mojave上运行Jetbrains Rider 2019.1.3(也包含2019.1.2)。相同的过程适用于VS for Mac上的nuget打包工具。
如果我在软件包控制台上手动运行restore and add命令,它不会失败。
例如,这是我在尝试更新Xamarin.Forms nuget时在NuGet日志选项卡中收到的消息:
NU3004:从源代码中打包'Xamarin.Forms 4.1.0.581479' 'https://api.nuget.org/v3/index.json':此存储库指示 它的所有软件包都经过存储库签名;但是,这个包是 未签名。程序包还原失败。回滚包更改 'xxx'。 NuGet.PackageManagement.PackageReferenceRollbackException: 程序包还原失败。回滚软件包对“ xxx”的更改。在 NuGet.PackageManagement.NuGetPackageManager.ExecuteBuildIntegratedProjectActionsAsync (NuGet.ProjectManagement.Projects.BuildIntegratedNuGetProject buildIntegratedProject,System.Collections.Generic.IEnumerable1 [T] nuGetProjectActions,NuGet.ProjectManagement.INuGetProjectContext nuGetProjectContext,System.Threading.CancellationToken令牌) [0x00c45]在<7a2d2afbbb674cd48052281699c39e01>:0中 NuGet.PackageManagement.NuGetPackageManager.ExecuteNuGetProjectActionsAsync (NuGet.ProjectManagement.NuGetProject nuGetProject, System.Collections.Generic.IEnumerable1 [T] nuGetProjectActions, NuGet.ProjectManagement.INuGetProjectContext nuGetProjectContext, NuGet.Protocol.Core.Types.PackageDownloadContext downloadContext下载, System.Threading.CancellationToken令牌)[0x00121]在 <7a2d2afbbb674cd48052281699c39e01>:0在 NuGet.PackageManagement.NuGetPackageManager.InstallPackageAsync (NuGet.ProjectManagement.NuGetProject nuGetProject, NuGet.Packaging.Core.PackageIdentity packageIdentity, NuGet.PackageManagement.ResolutionContext resolutionContext, NuGet.ProjectManagement.INuGetProjectContext nuGetProjectContext, NuGet.Protocol.Core.Types.PackageDownloadContext downloadContext下载, System.Collections.Generic.IEnumerable1 [T] primarySources, System.Collections.Generic.IEnumerable1 [T] secondarySources, System.Threading.CancellationToken令牌)[0x00121]在 <7a2d2afbbb674cd48052281699c39e01>:0在 NuGet.PackageManagement.NuGetPackageManager.InstallPackageAsync (NuGet.ProjectManagement.NuGetProject nuGetProject, NuGet.Packaging.Core.PackageIdentity packageIdentity, NuGet.PackageManagement.ResolutionContext resolutionContext, NuGet.ProjectManagement.INuGetProjectContext nuGetProjectContext, System.Collections.Generic.IEnumerable1 [T] primarySources, System.Collections.Generic.IEnumerable1 [T] secondarySources, System.Threading.CancellationToken令牌)[0x000d3] <7a2d2afbbb674cd48052281699c39e01>:0在 JetBrains.ProjectModel.NuGet.Operations.NuGetInstallOperation + <> c__DisplayClass5_0.b__0 (NuGet.ProjectManagement.NuGetProject nuGetProject, System.Threading.CancellationToken令牌)[0x000a5]在 :0处 JetBrains.ProjectModel.NuGet.Operations.NuGetInstallOperation.InstallInternal (JetBrains.ProjectModel.IProject项目,System.String packageId, System.String packgeUserStr, JetBrains.ProjectModel.NuGet.Configs.NuGetFeedContext feedContext, System.Int32 nestedLevel, JetBrains.ProjectModel.NuGet.Logging.NuGetNotificationMode模式, JetBrains.ProjectModel.NuGet.Operations.NuGetOperationReporter 报告程序,System.Func`3 [T1,T2,TResult] nativeInstall)[0x003e6]在 :0
命令nuget trusted-signers list
告诉我
没有可信任的签名者。
我试图使用命令nuget trusted-signers Add -Name nuget.org
强制将nuget.org作为受信任的签名者添加到〜/ .config / NuGet / NuGet.Config文件中,但问题仍然存在。
有人有什么主意吗?
答案 0 :(得分:0)
这是NuGet中的本机错误(请参见https://github.com/NuGet/Home/issues/7574)。您在Rider 2019.1中遇到了此bug(https://youtrack.jetbrains.com/issue/RIDER-30213),因为它使用了NuGet 4.9(无bugfix)。 在Rider 2019.2中,内部NuGet版本提高到5.2;现在该错误已修复。