0

通過的NuGet下載System.Data.Sqlite我試圖下載包System.Data.Sqlite通過股票的NuGet在Visual Studio 2015年社區EF6支持。按「安裝」後,我得到依賴關係。然後,在確認之後,一段時間沒有任何事情發生,然後在Output窗口中,我得到「Object reference not set to object of instance」的錯誤。我將NuGet升級到3.2.x,但問題依然存在。我能做些什麼來解決它?不能在VS2015


編輯:從輸出控制檯日誌:

Attempting to gather dependencies information for package 'System.Data.SQLite.1.0.98.1' with respect to project 'WPTManager', targeting '.NETFramework,Version=v4.5.2' 
Attempting to resolve dependencies for package 'System.Data.SQLite.1.0.98.1' with DependencyBehavior 'Lowest' 
Resolving actions to install package 'System.Data.SQLite.1.0.98.1' 
Resolved actions to install package 'System.Data.SQLite.1.0.98.1' 
Install failed. Rolling back... 
Package 'EntityFramework 6.0.0' does not exist in project 'WPTManager' 
Package 'EntityFramework 6.0.0' does not exist in folder 'D:\Dokumenty\Dev\VS\Projekty\WPTManager\packages' 
System.NullReferenceException: Object reference not set to an instance of an object. 
    at NuGet.Protocol.Core.v3.GlobalPackagesFolderUtility.<AddPackageAsync>d__1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 
    at NuGet.Protocol.Core.v3.DownloadResourceV3.<GetDownloadResourceResultAsync>d__4.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 NuGet.PackageManagement.PackageDownloader.<GetDownloadResourceResultAsync>d__1.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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) 
    at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__42.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
    at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__42.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 NuGet.PackageManagement.UI.UIActionEngine.<ExecuteActionsAsync>d__5.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 NuGet.PackageManagement.UI.UIActionEngine.<PerformActionAsync>d__3.MoveNext() 
========== Finished ========== 
+0

究竟哪個包? – ErikEJ

+0

@ErikEJ System.Data.SQLite.1.0.98.1 – Spook

回答

0

實測一種解決方法。

  1. 安裝通過的NuGet實體框架;
  2. 現在安裝System.Data.SQLite - 它會正確安裝。

沒有直接的解決方案,但 - 最有可能是在一個的NuGet錯誤。

0

我有同樣的問題。所以我從NuGet網站手動下載軟件包,然後我設置了自己的軟件包源,並從那裏正確安裝。這也只是像你的解決方法。