{"id":168,"date":"2010-12-01T19:03:14","date_gmt":"2010-12-01T19:03:14","guid":{"rendered":"http:\/\/www.stuartroberts.net\/?p=168"},"modified":"2010-12-01T19:03:14","modified_gmt":"2010-12-01T19:03:14","slug":"visual-studio-caching","status":"publish","type":"post","link":"http:\/\/www.stuartroberts.net\/index.php\/2010\/12\/01\/visual-studio-caching\/","title":{"rendered":"Visual Studio Caching"},"content":{"rendered":"<p>Since I&#8217;ve been developing with Visual Studio 2010 for SP I can&#8217;t help but feel I&#8217;ve wasted valuable time trying to resolve issues that the caching mechanism used by Visual Studio has caused.<\/p>\n<p>For example, I deployed a feature that created a list on the activating web using the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms476062.aspx\">ListInstance<\/a> element.  Initially, I set the name and description with hard coded values and all was good in the world.<\/p>\n<p>I then added a feature resource and added entries for the list instance&#8217;s name and description.  Deleting the list and re-deploying the solution (via Visual Studio) gave the desired result.  I then decided to change the display title of the list and updated the resource file accordingly.<br \/>\n<!--more--><br \/>\nI once again deleted the list and re-deployed the solution.  The name of the list stayed as it was originally in the resource file and had not updated with my change.  Slightly perplexed, I double checked the feature in the hive to make sure the resource had been correctly deployed, which of course, it had.<\/p>\n<p>Changing the name back to a hard coded value would correctly deploy but no matter what modifications I made to the resource string the title always showed using the original value given to it.  This is obviously due to caching I thought and decided to reset iis prior to deploying again.  As you might guess, this gave me the same results as before, still the wrong list title.<\/p>\n<p>Restarting Visual Studio and trying the deploy again, I was fairly confident that it would deploy, but once again I got the same old list title.  I restarted Visual Studio as I had experienced issues previously with deploying site column definitions that it complained about already existing, when I was completely certain that the column had been removed.  Doing this had resolved things then, but not this time.<\/p>\n<p>Deploying using PowerShell worked like a charm, confirming to me that the culprit here was indeed Visual Studio related.  As restarting Visual Studio had not resolved my issue, I investigated further and found that doing this had not restarted the vssphost4.exe process.  This process is responsible for executing SharePoint commands and had cached my resource file content.  Restarting this process and deploying my solution finally gave me the desired results.<\/p>\n<p>Phew.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since I&#8217;ve been developing with Visual Studio 2010 for SP I can&#8217;t help but feel I&#8217;ve wasted valuable time trying to resolve issues that the caching mechanism used by Visual Studio has caused. For example, I deployed a feature that &hellip; <a href=\"http:\/\/www.stuartroberts.net\/index.php\/2010\/12\/01\/visual-studio-caching\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[3],"tags":[5],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/plx2I-2I","_links":{"self":[{"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/168"}],"collection":[{"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/comments?post=168"}],"version-history":[{"count":5,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/168\/revisions"}],"predecessor-version":[{"id":981,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/168\/revisions\/981"}],"wp:attachment":[{"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/media?parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/categories?post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/tags?post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}