Quantcast
Channel: SharePoint Diary
Viewing all articles
Browse latest Browse all 1058

How to Clear SharePoint Designer Cache

$
0
0
We face some Odd issue with SharePoint Designer: SPD shows files checked out already even though they weren't. While trying to check-in, SPD errored with "Cannot perform this operation. The file is no longer checked out or has been deleted."

Also experienced SharePoint designer crash unexpectedly some times and few lists no longer visible in the All Files! This is due to SharePoint Designer caches content (including assemblies and XML configuration files).

To fix these issues, we've to clear SharePoint designer cache. Here is how:

To clear SharePoint Designer 2010 / SharePoint Designer 2013 cache, Close SPD first, Go to these two locations from your client machine (if you are using SPD in client) and delete all files from them: (Go to Start >> Run >> Type these locations one by one)
  1. %APPDATA%\Microsoft\Web Server Extensions\Cache
  2. %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\
It applies for SharePoint designer 2007 as well. Automation? Sure, We can place a bunch of commands in a Batch file to do the above.

cd "%APPDATA%\Microsoft\Web Server Extensions\Cache"

del *.web /S /Q "%APPDATA%\Microsoft\Web Server Extensions\Cache"

cd "%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\"

rmdir /S /Q "%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\"

mkdir "%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache"

pause


Well, That's a olden days method. Lets use PowerShell to make it efficient. PowerShell script to Clear SharePoint Designer Cache:
#Check if SharePoint Designer is running!

if(Get-Process 'SPDESIGN' -ea SilentlyContinue)
{
    "Please close SharePoint Designer before running this script!"
}

else
{
    if (Test-Path $Env:USERPROFILE"\AppData\Roaming\Microsoft\Web Server Extensions\Cache")
    {
  Remove-Item $Env:USERPROFILE"\AppData\Roaming\Microsoft\Web Server Extensions\Cache" -force -recurse -ErrorAction SilentlyContinue
    }
    if( test-path $Env:USERPROFILE"\AppData\Local\Microsoft\WebsiteCache")
    {
     Remove-Item $Env:USERPROFILE"\AppData\Local\Microsoft\WebsiteCache" -force -recurse -ErrorAction SilentlyContinue
    }
    Write-host "SharePoint Designer Cache Cleared!"
}

Viewing all articles
Browse latest Browse all 1058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>