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
- I'm developing website for '_layouts' directory and some DLLs for this website (data access level (DAL.dll) for exapmple)
- In the website there is a reference to DAL.dll (DAL.dll in GAC)
- Also In the website there is a local reference to DAL.dll (for quick resharper's cache update)
- All is fine! :)
- ...but when I have to upgrade DAL.dll in GAC I can't do this - Access deny!
- 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:
- Press 'Ctrl + Alt + A' for openning 'Command window'
- Execute command ReSharper_ToggleSuspended for unload Resharper
- Install your assembly (WSP Builder -> Copy to GAC)
- 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
精彩评论