单击一次更新删除用户创建的桌面图标
在某些(但不是全部)单击一次应用程序中,当用户将图标复制到桌面时,当用户更新应用程序时,图标将被删除。是什么原因导致这种情况以及如何防止这种情况发生?
In some, but not all, of our click-once applications when the user copies the icon to the desktop the icon will be deleted when the user updates the application. What causes this and how do I prevent it from happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您的目标不是 .NET 3.5;如果是,您可以选中部署属性中的复选框以使其自动创建桌面快捷方式。
我认为这就是你开始发生这个问题的原因。我认为在 .NET 3.5 SP-1 中,微软开始删除桌面快捷方式(如果存在),假设您要使用 .NET 3.5 并让它为您放置桌面快捷方式。他们不就是这样吗?
对于不以 .NET 3.5 或 .NET 4.0 为目标的人(比如我自己),您可以在程序的启动中添加一些代码,以便在用户每次运行应用程序时(或您想要的任何时候)创建桌面快捷方式。
I'm assuming you are not targeting .NET 3.5; if you are, you can check the box in the deployment properties to have it create the desktop shortcut automatically.
I think this is why this problem you're having started happening. I think in .NET 3.5 SP-1, Microsoft started removing the desktop shortcut if it existed, assuming you were going to use .NET 3.5 and have it put the desktop shortcut there for you. Isn't that kind of them?
For people (like myself) who are not targeting .NET 3.5 or .NET 4.0, you can add a bit of code to your program's startup that will create the desktop shortcut every time the user runs the application (or whenever you want).