2017-08-20 115 views
1

我最近更新了自12月/ 1月以來還沒有開發過的舊的c#UWP項目。所以我決定打開它並通過nuget更新所有打包。EntityFrameworkCore.Tools的NuGet包更新錯誤

我正在運行VS2017 v15.3.1nuget v4.3.0

所以我更新通過的NuGet所有的包,但有麻煩更新包Microsoft.EntityFrameworkCore.Tools

Restoring packages for D:\Programming\C#\Projekts VS2017\myUWPproject\myUWPproject\myUWPproject.csproj... GET https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.clients.activedirectory/index.json OK https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.clients.activedirectory/index.json 462ms Microsoft.OneDriveSDK.Authentication 1.0.10 does not provide an inclusive lower bound for dependency Microsoft.IdentityModel.Clients.ActiveDirectory (> 2.22.0 && < 3.0.0). An approximate best match of Microsoft.IdentityModel.Clients.ActiveDirectory 2.22.302111727 was resolved. Package Microsoft.EntityFrameworkCore.Tools 2.0.0 is not compatible with uap10.0.14393 (UAP,Version=v10.0.14393). Package Microsoft.EntityFrameworkCore.Tools 2.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0) Package Microsoft.EntityFrameworkCore.Tools 2.0.0 is not compatible with uap10.0.14393 (UAP,Version=v10.0.14393)/win10-arm. Package Microsoft.EntityFrameworkCore.Tools 2.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0) Package Microsoft.EntityFrameworkCore.Tools 2.0.0 is not compatible with uap10.0.14393 (UAP,Version=v10.0.14393)/win10-arm-aot. Package Microsoft.EntityFrameworkCore.Tools 2.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0) Package Microsoft.EntityFrameworkCore.Tools 2.0.0 is not compatible with uap10.0.14393 (UAP,Version=v10.0.14393)/win10-x64. Package Microsoft.EntityFrameworkCore.Tools 2.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0) Package Microsoft.EntityFrameworkCore.Tools 2.0.0 is not compatible with uap10.0.14393 (UAP,Version=v10.0.14393)/win10-x64-aot. Package Microsoft.EntityFrameworkCore.Tools 2.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0) Package Microsoft.EntityFrameworkCore.Tools 2.0.0 is not compatible with uap10.0.14393 (UAP,Version=v10.0.14393)/win10-x86. Package Microsoft.EntityFrameworkCore.Tools 2.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0) Package Microsoft.EntityFrameworkCore.Tools 2.0.0 is not compatible with uap10.0.14393 (UAP,Version=v10.0.14393)/win10-x86-aot. Package Microsoft.EntityFrameworkCore.Tools 2.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0) Package restore failed. Rolling back package changes for 'myUWPproject'. Time Elapsed: 00:00:02.1287297 ========== Finished ==========

所以我從項目中刪除它,以防萬一我也刪除該文件夾C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\Tools爲好,但沒有運氣。當試圖重新安裝時,我得到了以上輸出。

首先,我是這麼認爲的取出後可能是因爲

Microsoft.OneDriveSDK.Authentication 1.0.10 does not provide an inclusive lower bound for dependency Microsoft.IdentityModel.Clients.ActiveDirectory (> 2.22.0 && < 3.0.0). An approximate best match of Microsoft.IdentityModel.Clients.ActiveDirectory 2.22.302111727 was resolved. 

。它仍然給出了相同的消息(沒有Microsoft.OneDriveSDK.Authentication部分),所以我再次重新安裝它。

我也嘗試將最小和目標版本設置爲創作者更新,希望解決uap10.0.14393問題,但沒有運氣,因此我將最低版本設置回14393(週年紀念更新)。

有人能幫助我進入正確的方向嗎?我不確定,還有什麼我可以嘗試。

如果是任何幫助,已安裝的軟件包的其餘部分是:

Microsoft.EntityFrameworkCore.Sqlite v2.0.0 
Microsoft.NETCore.UniversalWindowsPlatform v5.4.0 
Microsoft.OneDriveSDK v2.0.7 
Microsoft.OneDriveSDK.Authentication v1.0.10 
Win2D.uwp v1.21.0 

回答

4

So I updated all packages via nuget, but having trouble updating the package Microsoft.EntityFrameworkCore.Tools

有你需要注意的一個關鍵點。 微軟,作者包Microsoft.EntityFrameworkCore.Tools已於2017年8月12日發佈了新版本2.0(8/12/2017)(前幾天),其中支持:.netstandard2.0

enter image description here

然而,SDK 10.0.1439310.0.15063不會被更新,以兼容與包.netstandard2.0。所以,如果你現在安裝的軟件包,它支持:.netstandard2.0。在UWP項目,你會得到如下錯誤:

Package Microsoft.EntityFrameworkCore.Tools 2.0.0 is not compatible with uap10.0.14393 (UAP,Version=v10.0.14393). Package Microsoft.EntityFrameworkCore.Tools 2.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0) Package

要解決此問題,請請使用包Microsoft.EntityFrameworkCore.Tools 1.1.1,而不是2.0.0的版本。

更新:有一個release note for .netstandard 2.0:「UWP正在進行中,將於今年晚些時候發貨。」

+0

啊我不知道'.netstandard2.0'的東西。因此,我將使用'Microsoft.EntityFrameworkCore.Tools' v1.1.1,直到新的SDK出來(我假設在今年年底的某個地方)。非常感謝,我對此感到非常頭疼:D – user3079834

+0

@ user3079834,是的,https://github.com/dotnet/announcements/issues/24「UWP正在進行中,將於今年晚些時候發佈」 –