简体   繁体   English

实体框架程序包管理器控制台命令错误-生成失败

[英]Entity Framework Package Manager Console Commands Error - failed to build

Whenever I try to run any entity framework command such as add-migration or update-database, the vast majority of the time I get an error "The project 'X' failed to build". 每当我尝试运行任何实体框架命令(例如add-migration或update-database)时,绝大多数时候我都会收到错误消息“项目'X'生成失败”。 The project builds fine in visual studio, and if I am persistent and keep trying eventually the command will work. 该项目在Visual Studio中构建良好,如果我坚持不懈,并继续尝试,最终该命令将起作用。 It can be very frustrating as sometimes it will work on the first 5 tries, and sometimes it could take 50. 它有时会在前5次尝试中起作用,有时可能需要50次尝试,因此可能会非常令人沮丧。

I have read around for tips and nothing has worked so far. 我已经阅读了一些提示,到目前为止还没有任何效果。 I think it must be something to do with the settings that the package manager console uses to build the project but I don't know what they might be or how to configure them. 我认为这一定与程序包管理器控制台用于构建项目的设置有关,但我不知道它们可能是什么或如何配置它们。

Has anyone run into this problem before that can offer advice? 有谁遇到过这个问题,然后才能提供建议?

Finally found this to be a problem caused by Resharper . 最后发现这是由Resharper引起的问题。 Suspending resharper whilst running the commands meant that they don't fail anymore. 在运行命令时暂停重新共享意味着它们不再失败。 I can only assume the problem was resharper having a handle on files whilst the build script runs during the command executions. 我只能假设问题是在命令执行期间运行构建脚本时,文件共享具有处理功能。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在项目中管理Entity Framework的程序包管理器控制台命令 - Managing Package Manager Console commands for Entity Framework in project 实体框架包管理器控制台问题 - Entity Framework Package Manager Console question 我得到“构建失败”。 我在 Package 管理器控制台上写的任何东西都出错,没有任何其他解释 - I get "Build failed." error for anything I write on Package Manager Console without any other explanation Project X 以框架“.NETStandard”为目标。 实体框架 Package 管理器控制台工具不支持此框架 - Project X targets framework '.NETStandard'. The Entity Framework Package Manager Console Tools don't support this framework 使用包管理器控制台“ Update-Database”等在实体框架中以编程方式连接字符串 - Programmatically connection string in entity framework with package manager console “Update-Database” etc 当我在 package 管理器控制台中的 Visual Studio 2013 中安装实体框架时 - When I am installing Entity Framework in Visual Studio 2013 in the package manager console 实体框架:在包管理器控制台VS 2012中添加迁移时抛出Null Reference Exception - Entity framework: Null Reference Exception thrown when adding migration in package manager console VS 2012 是否可以从 package 管理器控制台运行 angular 命令? - Is it possible to run angular commands from package manager console? 包安装错误 - 实体框架 - Package Installation Error - Entity Framework 实体框架7,Visual Studio 2015,控制台命令不起作用 - Entity framework 7, visual studio 2015, console commands don't work
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM