在没有 Mage 的情况下清除 .NET 下载的应用程序缓存?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2418542/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 14:03:06  来源:igfitidea点击:

Clear the .NET-downloaded application cache without Mage?

.netdeploymentclickonce

提问by isorfir

I have a .NET application that I distribute using ClickOnce and I make available online only. How do I clear the download cache from a users' machine that doesn't have Visual Studio installed?

我有一个 .NET 应用程序,我使用 ClickOnce 分发该应用程序,并且只能在线使用。如何从未安装 Visual Studio 的用户计算机中清除下载缓存?

回答by codeConcussion

Visual Studio isn't needed, just Mage. It comes with the Windows SDK for people that haven't gotten it via Visual Studio or the Framework SDK.

不需要 Visual Studio,只需要Mage。它带有 Windows SDK,适用于尚未通过 Visual Studio 或 Framework SDK 获得它的人。

Another option would be to write codeto clear the cache. Or you could have them delete the folder ClickOnce files are installed in (C:\Users\[username]\AppData\Local\Appson my Windows 7 machine). That would be a last resort since it will remove every ClickOnce application they have installed.

另一种选择是编写代码来清除缓存。或者您可以让他们删除安装 ClickOnce 文件的文件夹(C:\Users\[username]\AppData\Local\Apps在我的 Windows 7 机器上)。这将是最后的手段,因为它将删除他们安装的每个 ClickOnce 应用程序。

You don't have to have Mage installed to clear the cache; running rundll32 dfshim CleanOnlineAppCachefrom the command line accomplishes the same thing as mage -cc.

您不必安装 Mage 即可清除缓存;rundll32 dfshim CleanOnlineAppCache从命令行运行可以完成与mage -cc.