How LocalDB MDF file property “Copy if newer” works

别来无恙 提交于 2019-12-02 10:37:28

I received help from @SamiKuhmonen and @BrendanGreen on this matter and solution was that I was checking for existence of data in MDF file of my project folder through Server Explorer, what I should have done instead was to check the MDF file in bin\Debug folder where my data were permanent. I did it by creating a new connection in Server Explorer to output MDF file. I wrongly assumed that updated MDF file will overwrite the one in project folder as it is supposed to be feature of "Copy if newer". Actually it copies original file to bin folder rather than other way around. Quite obviously, the MDF fill will be empty for fresh installation and after deployment, application on user side will only refer to the deployed file i.e. similar to the one in bin\Debug.

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