开发者

Resharper + Sharepoint = locked DLL in GAC

开发者 https://www.devze.com 2022-12-19 00:54 出处:网络
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?

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 w开发者_StackOverflow中文版ant to reload VS every time I have to upgrade my DLLs in GAC :/


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.


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


I am using Visual Studio 2008 with Resharper 4.5 and VSeWSS 1.3 CTP March for Sharepoint and everything works fine, how are you referencing assemblies in your project? What kind of SharePoint development are you doing?


You cannot prevent this. It's a good practice to make a shadow copy for locked assemblies

s

0

精彩评论

暂无评论...
验证码 换一张
取 消