为什么在通过NuGet安装Microsoft.EntityFrameworkCore时会收到错误消息

时间:2017-06-02 00:39:18

标签: c# visual-studio nuget

  

Install-Package Microsoft.EntityFrameworkCore -Version 1.1.2

  

GET   https://api.nuget.org/v3/registration1-gz/microsoft.entityframeworkcore/index.json   好   https://api.nuget.org/v3/registration1-gz/microsoft.entityframeworkcore/index.json   924ms为C:\ Users \ Usr \ Documents \ Visual Studio恢复包   2017 \ Projects \ Prj10 \ Prj10 \ Prj10.csproj ...安装包:   包Microsoft.CodeAnalysis.CSharp 1.3.0与。不兼容   netcoreapp1.1(.NETCoreApp,Version = v1.1)。包   Microsoft.CodeAnalysis.CSharp 1.3.0支持:portable-net 45 + win8   (.NETPortable,Version = v0.0,Profile = Profile7)行:1 char:1   + Install-Package Microsoft.EntityFrameworkCore -Version 1.1.2   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand   Install-Package:软件包Microsoft.CodeAnalysis.Common 1.3.0不是   与netcoreapp1.1兼容(.NETCoreApp,Version = v1.1)。包   Microsoft.CodeAnalysis.Common 1.3.0支持:portable-net 45 + win8   (.NETPortable,Version = v0.0,Profile = Profile7)行:1 char:1   + Install-Package Microsoft.EntityFrameworkCore -Version 1.1.2   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand   安装包:一个或多个包与之不兼容   .NETCoreApp,版本= 1.1版。在行:1个字符:1   + Install-Package Microsoft.EntityFrameworkCore -Version 1.1.2   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand   安装包:包还原失败。回滚包更改   为了伊斯兰QA'。在行:1个字符:1   + Install-Package Microsoft.EntityFrameworkCore -Version 1.1.2   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

1 个答案:

答案 0 :(得分:0)

您的答案在错误消息中。似乎某些包与您选择的配置文件不兼容。确保选择的软件包版本,或者您更改正在使用的配置文件的软件包。

以下是错误消息中的项目:

  

包Microsoft.CodeAnalysis.CSharp 1.3.0与。不兼容   netcoreapp1.1包Microsoft.CodeAnalysis.CSharp 1.3.0支持:   portable-net 45 + win8(.NETPortable,Version = v0.0,Profile = Profile7)

     

一个或多个软件包与.NETCoreApp,Version = v1.1

不兼容

似乎EntityFrameworkCore依赖于与netcoreapp1.1不兼容的CodeAnalysus.CSharp版本。它似乎需要完整的netstandard1.3配置文件