防止每次都重建实体框架模型
我有一个基于实体框架的数据层,它位于单独的程序集中。在同一个解决方案中,我有一个业务程序集,如 ASP.Net MVC 应用程序和一些单元测试程序集。 EF 模型相当大,构建需要大约 20 秒。我的问题是每次需要构建时它都会被重建。如果我在单元测试中更改一行,我必须等待 20 秒以上才能完成构建。有人知道防止 EF 模型触发重建的技巧吗(我不想从解决方案中卸载程序集)?
I've got an entity framework based data layer which is in a separate assembly. In the same solution I've got a business assembly, as ASP.Net MVC application and some unit test assemblies. The EF model is quite large and takes around 20 seconds to build. My problem is it's getting rebuilt every time a build is required. If I change one line in a unit test I have to wait 20+ seconds for the build to complete. Anyone know of any tricks to prevent the EF model triggering rebuilds (I don't want to unload the assembly from the solution)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在解决方案的属性中,我相信您可以指定为解决方案构建哪些程序集。右键单击解决方案并选择“属性”。选择配置属性。在右侧窗格中,您可以选择构建哪些项目。希望这有帮助。
In the properties of the solution, I believe you can specify what assemblies get built for the solution. Right click on the solution and select "Properties". Select the Configuration Properties. In the right pane you can select what items get built. Hope this helps.