繁体   English   中英

如何修复恢复nuget包错误?

[英]How to fix restoring nuget packages error?

几周后,我在 Visual Studio 2010 中重新访问了我的 .NET C# 项目。我只更改了源代码中的一行并尝试重建该项目,但出现此错误:

还原 NuGet 包时出错:找不到。 (来自 HRESULT 的异常:0x80030002 (STG_E_FILENOTFOUND))

我不知道为什么会出现这个错误。 什么都没有改变,不知何故这个 nuget 被损坏了。 我通过谷歌做了很多搜索,但没有发现任何能让我走上正轨的东西。

是否可以一起删除nuget,因为它只是一个悲伤的原因?

我遇到了同样的问题:我通过转到“工具”->“选项”->“项目和解决方案”->“构建并运行”并单击“确定”解决了这个问题

来源: https : //developercommunity.visualstudio.com/content/problem/1015106/exception-occurred-exception-from-hresult-0x800200.html

我也有这个调用堆栈:

    System.Runtime.InteropServices.COMException (0x80020009): Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))
    at EnvDTE.Property.get_Value()
    at NuGetVSExtension.OutputConsoleLogger.<GetMSBuildVerbosityLevelAsync>d__23.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at NuGetVSExtension.OutputConsoleLogger.<<Start>b__24_0>d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
    at NuGetVSExtension.OutputConsoleLogger.Start()
    at NuGet.PackageManagement.UI.NuGetUI.BeginOperation()
    at NuGet.PackageManagement.UI.UIActionEngine.<>c__DisplayClass12_0.<<PerformActionImplAsync>b__0>d.MoveNext()

如果您在 Visual Studio 中右键单击您的解决方案。 您是否看到任何名为“启用 NuGet 包还原”的选项?

如果是,请尝试单击它并再次重建。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM