After a couple of weeks I revisited my .NET C# project in Visual Studio 2010. I changed just one line in source code and tried to rebuild the project and I get this error:
Error occurred while restoring NuGet packages: could not be found. (Exception from HRESULT: 0x80030002 (STG_E_FILENOTFOUND))
I don't have the slightest clue why this error appeared. Nothing was changed, somehow this nuget got corrupted. I have done a lot of searching via google but found nothing that would get me on the right track.
is it possible to remove nuget all together, because it is nothing but a cause of grief?
I've faced with the same issue: I solved this problem by going to Tools -> Options -> Projects and Solutions -> Build and Run and clicking on OK
I also had this call stack:
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()
If you right click your solution in Visual Studio. Do you see any option called "Enable NuGet Package Restore"?
If yes, try to click on it and rebuild again.
User contributions licensed under CC BY-SA 3.0