Find out which process is locking a DLL without extra tools

January 26, 2009   11:28


unlock dll in useToday I got the “The process cannot access the file … because it is being used by another process” error again, during a development build. And as long as the DLL is locked, it’s not possible to do a successful build.

Most sites and tips on the internet suggest to download some tool to detect which process is using the DLL. It seems that not many people are aware that, since Windows XP, we don’t need to download (or even pay for) a tool to detect this.

Just launch the windows console and navigate to the directory of the DLL. Now type “tasklist.exe /m locked.dll” and it will show you exactly which processes have loaded and locked this DLL.

Happy unlocking ;)

Tags: , , , , , .





Don’t use dashes (-) in a custom site definition folder name

October 7, 2008   15:15


For a project we designed a new site definition which used the following directory:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\SiteDefinition-Customer.Project.Moss2007.Portal.SupportSite
There was no problem at all to create a new site based on this template, but after a while we experienced a problem in a different area.

As you might know it is possible at the “Page Layout and Site Template Settings” page (/_Layouts/AreaTemplateSettings.aspx) to limit the selectable site templates for the user. Somehow SharePoint did not allow us to set our own template as only selectable template. After we saved the page, it would simply switch back to the previous known settings.

page_layout_and_site_template_settings_and_dashes

After a lot of research, I finally managed to solve the problem by removing the – sign from the directory name. It looks like SharePoint does some kind of internal split function at the “Page Layout and Site Template Settings” page, which makes it impossible to save settings for site templates with a dash in the folder name.

To prevent any trouble with your custom site definitions, make sure you don’t use a – sign in the folder name or even better: only use alphabetic characters.

Tags: , , , , , , , .









The content expressed in this blog are those of Edwin Vriethoff and do not represent his employer's view in anyway. The contents of this blog has been carefully put together, but Edwin Vriethoff is not responsible in any way for any direct or indirect harm caused by individuals or organizations using the content of this blog in any way.