ClickOnce Application user settings locations

扶醉桌前 提交于 2019-12-01 11:10:50

Normally, you shouldn't have to care about the location yourself. Just mark your XML file as data in the ClickOnce manifest and access it using the well-known:

ApplicationDeployment.CurrentDeployment.DataDirectory

Here's an MSDN article describing it: Accessing Local and Remote Data in ClickOnce Applications

I would never store any data that is important to be retained in the case of an update in the actual ClickOnce deployment directories -- it is too dangerous. You should copy those files out to ApplicationData and access them there. This article shows you how to do that.

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