MVC updating .edmx files (.msl, .csdl, .ssdl)

我与影子孤独终老i 提交于 2019-12-20 04:34:45

问题


I have 3 .edmx files (.msl, .csdl, .ssdl) in my root project directory where the web.config is. Why are these not updating when I do a 'update model from database'?

I have to manually add the new fields to these files...


回答1:


.msl, .csdl and .ssdl are result of .edmx compilation, if you do not embedd them into assembly check that "EntityDeploy" is selected for "Build Action" in .edmx file properties (in Solution Explorer) and "Copy to Output Directory" is selected for "Metadata Artifact Processing" in model properties (in model designer), update your model and rebuild solution. After that they will be copied to bin\Debug subfolder.

BTW, you could select "Embedd into Output Assembly", update connection string, remove references to these files from solution and do not care about them anymore.



来源:https://stackoverflow.com/questions/15561534/mvc-updating-edmx-files-msl-csdl-ssdl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!