4

This is one of those, "was working 15 minutes ago" problems. I've been running my app without a problem and then all of the sudden I'm receiving this error when trying to load the design view:

Access to the path '[my-local-path]\Application Data\Microsoft\VisualStudio\10.0\ProjectAssemblies\waswbeet01\Interop.EModelView.dll' is denied. 

As far as I can tell I didn't make any significant changes to the app to trigger this. I can go to the specific file location and see the dll there and it's permissions for SYSTEM are full control.

My head hurts from banging it against my desk.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Paul
  • 231
  • 5
  • 14

2 Answers2

3

Sounds like something has that file open / locked - there are a few things you can try:

  • Get Visual Studio to Clean and then rebuild the solution (it might be Visual Studio that has the lock)
  • Close and re-open Visual Studio
  • Use a tool like Process Explorer to check to see what processes have a handle to that file (and also optionally forcibly close the handles)
  • Restart your PC

I've seen problems in the past where Visual Studio keeps handles / locks on files that it shouldn't which can cause problems building - this is why I suggested restarting Visual Studio / doing a clean build as the first options.

Justin
  • 84,773
  • 49
  • 224
  • 367
  • In process explorer, when I have the project open in VS (app isn't running, just in edit mode) I see 3 entries for Interop.EModelView.dll. // explorer.exe - Handle - HKCR\Applications\EModelViewer.exe // devenv.exe - DLL - \qqkcrtf601\Interop.EModelView.dll // devenv.exe - Handle - \qqkcrtf601\Interop.EModelView.dll When I try to run the app I get 2 more _handle_ instances of the dll at different file locations and 3 more _dll_ instances 2 that look like duplicate entries and then one in a different location. – Paul Jul 29 '11 at 12:50
  • one of those things (bar process explorer, which I didn't try) worked, thanks! Just wasted a morning stuck on this! – DevDave Feb 16 '12 at 11:32
0

Are you running under Widows 7?
If so, you must start Visual Studio under Administrator to get full access for the dlls.

Also, are you trying to modify and build your application during the execution?
If so, you should stop your application before you can change the dlls.

VMAtm
  • 27,943
  • 17
  • 79
  • 125
  • No, I'm on XP, and I'm not trying to build during the execution. It was working fine earlier today. So I'm not sure what could've happened between a successful run to this. – Paul Jul 28 '11 at 21:55