1

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.

Adrian McCarthy
  • 45,555
  • 16
  • 123
  • 175
  • @Hans Passant: Even after elevating to administrator, I get a dialog saying I cannot delete system files. "You need permission to perform this action[.] You require permission from SYSTEM to make changes to this file[.]" – Adrian McCarthy Aug 05 '11 at 20:30
  • Erm, wait, what *exact* file are you trying to delete. Post the full path. – Hans Passant Aug 05 '11 at 20:36
  • @Hans: Just deleting from winsxs would be a bad idea. – Carey Gregory Aug 05 '11 at 21:26
  • Exact path: C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcr90d.dll – Adrian McCarthy Aug 05 '11 at 21:56
  • You seem to be persuing the course that means the app runs nowhere. Surely you need to fix the dependency. – David Heffernan Aug 05 '11 at 23:33
  • @David: I did fix the dependency. My point is I want to be able to detect other bad dependencies on my machine. I want any app that still has that dependency to fail, so that I know about it and can fix it. – Adrian McCarthy Aug 11 '11 at 15:44

1 Answers1

2

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.

Community
  • 1
  • 1
Carey Gregory
  • 6,836
  • 2
  • 26
  • 47