ClickOnce 和额外文件
我试图说服我的团队,使用 ClickOnce 对我们的部署和更新有好处。我遇到的唯一不是卖家的问题是外部文件(SqlCe 数据文件、日志文件等)无法编码为与可执行文件存在于同一目录中。
我建议的一个解决方法是我们总是编码以使用 c: 驱动器上的已知目录,但这看起来像是一种 hack。
是否有更好的方法将 ClickOnce 与外部文件一起使用,或者这是唯一的方法?
I'm trying to convince my team that using ClickOnce will be good for us regarding deployment and updates. The only issue I have run across that isn't a seller is the fact that external files ( SqlCe data files, log files, etc ) can't be coded to exist in the same directory as the executable.
One workaround I suggested is that we always code to use a known directory on the c: drive but that just seems like a hack.
Is there a better way to use ClickOnce with external files or is this only way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在项目属性>中选择要包含在部署中的文件发布选项卡>应用程序文件...
问题是您将外部文件放在项目的文件夹中,但希望将它们部署到与可执行文件相同的文件夹中吗?在启动时获取执行程序集路径以及应用程序所需的任何子文件夹的路径很简单。
ClickOnce 很棒,但也有其烦恼。最近困扰我的是它 如果固定到 Windows 7 任务栏,则不会更新。
You can choose which files to include in the deployment in the project properties > Publish tab > Application Files...
Is the issue that you have the external files in a folder in the project but want to deploy them to the same folder as the executable? It's simple at startup to get the executing assembly path and then the path to any subfolders your app requires.
ClickOnce is great but it has its annoyances. The one that's bitten me most recently is that it doesn't update if it's pinned to a Windows 7 Taskbar.