EF 4.3.1 IMigrationMetadata.Target字符串导致“没有逻辑空间创建更多的用户字符串”。编译错误 [英] EF 4.3.1 IMigrationMetadata.Target strings are causing "No logical space left to create more user strings." compile errors

查看:87
本文介绍了EF 4.3.1 IMigrationMetadata.Target字符串导致“没有逻辑空间创建更多的用户字符串”。编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从4.3.x版本的Entity Framework发布以来,我们已经生成了〜80次迁移。每次我们生成新的迁移时,EF会为IMigrationMetadata.Target属性创建当前模型的快照。



由于每个迁移都在我们的程序集中添加了约135k个字符,我们开始击中临界质量。我们正在收到一个没有逻辑空间来创建更多的用户字符串。编译错误。结合使用预编译视图,您有很多字符串。



使用复杂模型使用EF迁移的最佳长期方法是什么?



也许添加迁移应该生成这些w /资源文件。

解决方案

感谢您的报告。我已经将这个问题添加到了我们积压的EF6。



现在,用资源查找替换字符串是我能想到的最好的解决方法。 b $ b

We've generated ~80 migrations since the release of the 4.3.x version of Entity Framework. Each time we generate a new migration, EF gens a snapshot of the current model for the IMigrationMetadata.Target property.

Since each migration is adding ~135k characters to our assembly, we are starting to hit critical mass. We're now receiving a "No logical space left to create more user strings." compiler error. Combine that w/ the pre-compile views, and you've got a lot of strings.

What's the best long term approach to using EF migrations with a complex model?

Maybe add-migration should be generating these w/ resource files.

解决方案

Thanks for reporting this. I have added this issue to our backlog for EF6.

For now, replacing the string with a resource lookup is the best workaround I can think of.

这篇关于EF 4.3.1 IMigrationMetadata.Target字符串导致“没有逻辑空间创建更多的用户字符串”。编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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