Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper + Sharepoint = locked DLL in GAC

If you develop to Sharepoint with Resharper, there are DLL locks in GAC. This issue blocking you to publish your DLLs to GAC. How to deal with it?

UPD: here is my development scenario:

VS 2008, resharper 4.5

  1. I'm developing website for '_layouts' directory and some DLLs for this website (data access level (DAL.dll) for exapmple)
  2. In the website there is a reference to DAL.dll (DAL.dll in GAC)
  3. Also In the website there is a local reference to DAL.dll (for quick resharper's cache update)
  4. All is fine! :)
  5. ...but when I have to upgrade DAL.dll in GAC I can't do this - Access deny!
  6. OK, let's turn off resharper and try it again. Done!

I don't want to reload VS every time I have to upgrade my DLLs in GAC :/

like image 570
lak-b Avatar asked Nov 05 '22 16:11

lak-b


2 Answers

I have experienced the same problem with both 4.5 and 5.0 eap for both vs2008 and vs2010. The only solution I found was to temporarily unload the resharper add-in via the tools menus on 2008 (and options > resharper > suspend on 2010.)

I'll bet you're running wspbuilder add-in too. A funny symptom of this problem is that the folder c:\windows\assembly appears completely empty. Freaked me out the first time I saw it.

like image 112
x0n Avatar answered Nov 12 '22 16:11

x0n


I manually start/stop Resharper 5 in VS 2008 Command Window. Steps:

  1. Press 'Ctrl + Alt + A' for openning 'Command window'
  2. Execute command ReSharper_ToggleSuspended for unload Resharper
  3. Install your assembly (WSP Builder -> Copy to GAC)
  4. Execute command ReSharper_Resume or ReSharper_ToggleSuspended for run Resharper
like image 23
vladimir Avatar answered Nov 12 '22 18:11

vladimir