asp net core app出现MSB3277怎么办 [英] What to do if MSB3277 occurs in asp net core app

查看:42
本文介绍了asp net core app出现MSB3277怎么办的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用引用 EntityFrameworkCore 2.1.3 包的数据库项目,但 AspNetCore.App 元包包含 EntityFrameworkCore 2.1.2.引入我的数据库项目后,我收到了这个 msbuild-warning:

I am using a Database-Project referencing EntityFrameworkCore 2.1.3 package but the AspNetCore.App-metapackage contains EntityFrameworkCore 2.1.2. After bringing in my Database-Project I get this msbuild-warning:

Warning MSB3277 Found conflicts between different versions of "Microsoft.EntityFrameworkCore" that could not be resolved.

我在谷歌上搜索了一下,发现了这个文档:https://docs.microsoft.com/en-us/aspnet/core/fundamentals/metapackage-app?view=aspnetcore-2.1

I´ve googled around a bit an I found this doc: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/metapackage-app?view=aspnetcore-2.1

我正在使用依赖于 2.1.3 的第三方库(NpgSql for Postgre)...我应该降级所有软件包,以便它们使用 efcore 2.1.2 软件包还是应该忽略此警告?或者更好的问题:哪种方式不那么痛苦?

I´m using a third-party library (NpgSql for Postgre) which relies on 2.1.3... Should I downgrade all packages, so that they use efcore 2.1.2 package or should I ignore this warning? Or better question: Which way is less painful?

提前致谢

推荐答案

Npgsql.EntityFrameworkCore.PostgreSQL 目前的版本确实是 2.1.2,并且依赖于 Microsoft.EntityFrameworkCore 2.1.2.但是,将旧版本的 Npgsql EF Core 提供程序与较新的 EF Core 补丁版本一起使用应该没有任何问题.

It's true that Npgsql.EntityFrameworkCore.PostgreSQL is currently at version 2.1.2, and depends on Microsoft.EntityFrameworkCore 2.1.2. However, there shouldn't be any issue with using an older version of the Npgsql EF Core provider with newer patch versions of EF Core itself.

您可以通过在自己的项目中直接依赖 Microsoft.EntityFrameworkCore 2.1.3 来消除此警告.

You can probably get rid of this warning by taking a direct dependency on Microsoft.EntityFrameworkCore 2.1.3 in your own project.

这篇关于asp net core app出现MSB3277怎么办的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆