如何从 SxS 缓存中删除已卸载的 DLL

发布于 2024-11-28 04:11:58 字数 358 浏览 0 评论 0原文

我有 VS 2008。我升级到 VS 2010,并卸载了 VS 2008。

我有一个在我的计算机上运行的测试,但无法在构建实验室中的计算机上加载。经过一番调试,我意识到测试可执行文件仍然依赖于 msvcr90d.dll(这是一个 VC++ 2008 调试运行时库)。即使我已经卸载了 VS 2008,该测试仍然可以在我的计算机上运行,​​因为该运行时 DLL 仍然存在于并行缓存 (%windir%/winsxs) 中。构建实验室机器没有 DLL,因此不会在那里加载。

卸载 VS 2008 是否会导致其所有运行时 DLL 从并行缓存中删除?

有没有办法可以手动从并行缓存中删除这些旧的 DLL?我希望能够轻松地检测到我可能仍然具有过时依赖项的其他位置。

I had VS 2008. I upgraded to VS 2010, and uninstalled VS 2008.

I have a test that runs on my machine, but fails to load on machines in the build lab. After some debugging, I realized that the test executable still had a dependency on msvcr90d.dll (which is a VC++ 2008 debug runtime library). Even though I had uninstalled VS 2008, the test works on my machine because that runtime DLL still exists in the side-by-side cache (%windir%/winsxs). The build lab machine doesn't have the DLL, so it won't load there.

Shouldn't uninstalling VS 2008 have caused all of its runtime DLLs to be removed from the side-by-side cache?

Is there a way I can manually remove these old DLLs from the side-by-side cache? I'd like to be able to easily detect other places where I might still have an out-of-date dependency.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

_畞蕅 2024-12-05 04:11:58

您首先需要获得包含文件夹的所有权。那里的所有文件夹都将归 SYSTEM 或 TrustedInstaller 所有。所以这样做:

右键单击->属性->安全选项卡->高级->所有者选项卡->编辑->选择自己作为所有者->勾选“替换子容器和对象上的所有者->确定”

完成此操作后,您可以右键单击 - >属性 - >安全选项卡 - >给自己完全控制 - >确定

或者如果您熟悉cacls 命令您可以从命令行执行此操作。

一旦您获得完全控制权,您就可以移动该文件夹,我强烈建议您这样做而不是删除它。从winsxs 中删除文件可能会破坏其他应用程序甚至Windows。

You first need to take ownership of the containing folder. All the folders there will be owned by SYSTEM or TrustedInstaller. So do this:

Right click->Properties->Security tab->Advanced->Owner tab->Edit->Select yourself as owner->tick 'Replace owner on subcontainers and objects->OK

Once you've done that, you can do Right click->Properties->Security tab->Give yourself full control->OK

Or if you're familiar with the cacls command you can do it from the command line.

Once you've got full control you can move the folder, which I highly recommend over deleting it. Deleting files from winsxs is likely to break other applications or even Windows.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文