EF Core添加迁移构建失败 [英] EF Core add-migration Build Failed

查看:539
本文介绍了EF Core添加迁移构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个开发人员正在构建失败。在.NET Core EF项目中运行添加迁移时,没有解释生成失败的原因。您如何解决此错误?

I have a developer that is getting "Build failed." when running add-migration in a .NET Core EF project, with no explanation of why the build failed. How do you troubleshoot this error?

这是他在程序包管理器控制台中得到的:

This is what he gets in the Package Manager Console:

其他信息

我们还有其他一些使用相同解决方案代码(包括我自己)的开发人员

We have a few other developers using the same solution code (myself included) that have not issues with add-migration.

这是我在Package Manager控制台中看到的内容:

This is what I see in Package Manager Console:

我们已验证项目已构建,并且整个解决方案已构建。除了重新启动VS2015,我们还完成了 dotnet还原并全部重建了多次。我们已经验证了在解决方案资源管理器和软件包管理器控制台下拉菜单中都选择了正确的默认解决方案。我们已经验证他在计算机上安装了正确的SDK。我对下一步要检查的内容一无所知...在添加迁移期间遇到任何问题时,只要我有足够的信息就可以指导我进行检查,但是构建失败。 是相当无用的错误输出。

We've verified that the project builds, and the entire solution builds. We've done "dotnet restore" and rebuild all multiple times, in addition to restarting VS2015. We've verified that the correct default solution is selected both in Solution Explorer, and in the Package Manager Console drop-down. We've verified that he has the correct SDK installed on his machine. I'm at a loss as to what to check next...any time I've had a failure during add-migration I've gotten enough information to point me in the direction of what to check, but just "Build failed." is a fairly useless error output.

推荐答案

开发人员最终将项目从TFS取消映射,将其删除,然后重新映射它。现在正在为他工作。

The developer ended up un-mapping the project from TFS, deleting it, and re-mapping it. It's now working for him.

这篇关于EF Core添加迁移构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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