c# - 安装 Microsoft.EntityFrameworkCore v1.1.4 时出错
问题描述
我从我们的 git 中提取了我在本地机器上开发的 Web 应用程序,它在我们的开发服务器上完美运行。但是,当我尝试在本地计算机上访问它时,我得到:
无法加载文件或程序集“Microsoft.EntityFrameworkCore, Version=1.1.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60”或其依赖项之一。该系统找不到指定的文件。
当我去 Visual Studio 2015 中的 nuget 管理器时(我的老板坚持让我们继续使用 Visual Studio 2015),我搜索了Microsoft.EntityFrameWorkCore
,我发现,将其更改为 1.1.4,然后我收到错误:
无法安装包“Microsoft.EntityFrameworkCore 1.1.4”。您正在尝试将此包安装到以“.NETFramework,Version=v4.5”为目标的项目中,但该包不包含任何与该框架兼容的程序集引用或内容文件。有关详细信息,请联系包作者。
这是下载时的输出:
Attempting to gather dependency information for package 'Microsoft.EntityFrameworkCore.1.1.4' with respect to project 'SkipGenieService', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for package 'Microsoft.EntityFrameworkCore.1.1.4' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Microsoft.EntityFrameworkCore.1.1.4'
Resolved actions to install package 'Microsoft.EntityFrameworkCore.1.1.4'
Attempting to gather dependency information for package 'Microsoft.EntityFrameworkCore.1.1.4' with respect to project 'PeopleSearch', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for package 'Microsoft.EntityFrameworkCore.1.1.4' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Microsoft.EntityFrameworkCore.1.1.4'
Resolved actions to install package 'Microsoft.EntityFrameworkCore.1.1.4'
Install failed. Rolling back...
Package 'Microsoft.EntityFrameworkCore.1.1.4' does not exist in project 'SkipGenieService'
Package 'Microsoft.EntityFrameworkCore.1.1.4' does not exist in folder 'C:\Users\<username>\Source\Repos\<project>\packages'
Could not install package 'Microsoft.EntityFrameworkCore 1.1.4'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
========== Finished ==========
有什么建议么?我有两个项目到 .Net Framework 版本 v4.5 但出于某种原因下载管理器不相信它。
解决方案
Microsoft.EntityFrameworkCore 版本 1.1.4具有以下依赖项。请检查。
网络框架 4.5.1
- Microsoft.Extensions.Caching.Memory (>= 1.1.1)
- Microsoft.Extensions.DependencyInjection (>= 1.1.0)
- Microsoft.Extensions.Logging (>= 1.1.1)
- NETStandard.Library (>= 1.6.1)
- Remotion.Linq (>= 2.1.1)
- System.Collections.Immutable (>= 1.3.0)
- System.Interactive.Async (>= 3.0.0)
.NET 标准 1.3
- Microsoft.Extensions.Caching.Memory (>= 1.1.1)
- Microsoft.Extensions.DependencyInjection (>= 1.1.0)
- Microsoft.Extensions.Logging (>= 1.1.1)
- NETStandard.Library (>= 1.6.1)
- Remotion.Linq (>= 2.1.1)
- System.Collections.Immutable (>= 1.3.0)
- System.ComponentModel.Annotations (>= 4.3.0)
- System.Interactive.Async (>= 3.0.0)
- System.Linq.Queryable (>= 4.3.0)
推荐阅读
- scala - 如何在过滤器中创建动态表达式?
- django - 如何检查 self.client.post 中是否存在提交名称?
- sharepoint - Microsoft Graph V1 使用列表查找字段获取成员
- python-sphinx - 使用 github 操作发布文档
- linux - 使用 CMake 和 Conan 为 Linux 和 Windows 部署具有第三方依赖项的应用程序
- .net - Xamarin ADAL 登录永远加载
- django - 从 django 中的 JsonResponse 获取数据
- c# - 禁用 EF 核心查询优化器
- c# - 如何改进此代码的性能和设计
- java - 如何获取订阅我的公共 viber 帐户的订阅者的信息?