<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sitecore Xperiences &#187; Visual Studio</title>
	<atom:link href="https://blog.peplau.com.br/category/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.peplau.com.br</link>
	<description>The things I&#039;ve seen as a Sitecore Professional</description>
	<lastBuildDate>Sun, 09 Mar 2025 21:54:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>Avoiding IIS Restarts in a separated code environment, now with Sitecore Rocks</title>
		<link>https://blog.peplau.com.br/avoiding-iis-restarts-in-a-separated-code-environment-now-with-sitecore-rocks/</link>
		<comments>https://blog.peplau.com.br/avoiding-iis-restarts-in-a-separated-code-environment-now-with-sitecore-rocks/#comments</comments>
		<pubDate>Fri, 18 Sep 2015 23:03:47 +0000</pubDate>
		<dc:creator><![CDATA[Rodrigo Peplau]]></dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Sitecore Rocks]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.peplau.com.br/?p=239</guid>
		<description><![CDATA[<div class="lr_horizontal_share" data-share-url="https://blog.peplau.com.br/avoiding-iis-restarts-in-a-separated-code-environment-now-with-sitecore-rocks/"></div>This post is to bring some recent experiences from my last projects, as a continuation of my post &#8220;Avoiding IIS restarts with Robocopy in a Post Build event&#8220;. At that time I was proposing a post-building event triggering robocopy, which did the trick for that particular situation. Some time later I had access at my team to &#8220;CopySauce&#8221;, a software that keeps watching [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This post is to bring some recent experiences from my last projects, as a continuation of my post &#8220;<a title="Avoiding IIS restarts with Robocopy in a Post Build event" href="http://blog.peplau.com.br/visual-studio-solution-at-sitecore-projects-avoiding-iis-restarts-with-robocopy-in-a-post-build-event/" target="_blank">Avoiding IIS restarts with Robocopy in a Post Build event</a>&#8220;.</p>
<p>At that time I was proposing a post-building event triggering robocopy, which did the trick for that particular situation. Some time later I had access at my team to &#8220;CopySauce&#8221;, a software that keeps watching your code base for changes, deploying immediately after the change is detected. Interestingly, a couple weeks after that <a class="url" href="http://www.seanholmesby.com/" target="_blank" rel="external nofollow">Sean Holmesby</a> (author of CopySauce) commented on my post, suggesting his tool as an alternative for Robocopy.</p>
<p>One thing that I like with that approach is the file auto-deployment, because it very nicely mimics what was (in my opinion) the only advantage of that old strategy of having both your solution code and the sitecore webapp at the same place: avoiding IIS restarts when changing non-compiled files (JS, CSS, markup, etc). And better than Robocopy, this won&#8217;t even require a compilation to be triggered &#8211; files are transferred when you save it.</p>
<h3>Sitecore Rocks &#8211; Folder Syncronization</h3>
<p>The only issue I have with that is the obvious need to start CopySauce to have it acting. Since we are already using Sitecore Rocks for some development tasks, as soon as I knew about the existence of a native feature that is similar to CopySauce I decided to give it a chance. If you already have Sitecore Rocks installed in your Visual Studio then you have all you need to start working.</p>
<h3>Setup of your solution</h3>
<p>Configuring the folder synchronization on your solution is a bit different than CopySauce &#8211; instead of having a XML file Sitecore Rocks offers you some visual aids integrated to Visual Studio. Please check the <a title="Sitecore Rocks Folder Syncronization" href="https://github.com/JakobChristensen/Sitecore.Rocks.Docs/blob/gh-pages/Tools/FolderSynchronization.md" target="_blank">official documentation</a> for details on how to properly configure your project.</p>
<div id="attachment_248" style="width: 738px" class="wp-caption alignnone"><a href="http://blog.peplau.com.br/wp-content/uploads/FolderSynchronization1.png"><img class="wp-image-248 size-full" src="http://blog.peplau.com.br/wp-content/uploads/FolderSynchronization1.png" alt="You can specify what folders in your solution to start syncronizing with the right click menu" width="728" height="452" /></a><p class="wp-caption-text">You can specify what folders in your solution to start syncronizing with the right click menu</p></div>
<div id="attachment_250" style="width: 394px" class="wp-caption alignnone"><a href="http://blog.peplau.com.br/wp-content/uploads/FolderSynchronization3.png"><img class="wp-image-250 size-full" src="http://blog.peplau.com.br/wp-content/uploads/FolderSynchronization3.png" alt="Then select one of the two syncronization methods" width="384" height="196" /></a><p class="wp-caption-text">Then select one of the two syncronization methods</p></div>
<h3>Folder Synchronization &#8211; literally</h3>
<p>One thing which in my opinion is a weak of this tool is that, as it own name states, it can only be used to keep folders synchronized. As a consequence, you cannot keep files at the root in sync between solution and the webapp, having to manually deploy these.</p>
<p>This would typically affect you web.config at least, so avoid placing things that frequently changes in your solution at the root folder of your Website project.</p>
<div id="attachment_254" style="width: 244px" class="wp-caption alignnone"><a href="http://blog.peplau.com.br/wp-content/uploads/VS-Solution-Sync-Folders.png"><img class="wp-image-254 size-full" src="http://blog.peplau.com.br/wp-content/uploads/VS-Solution-Sync-Folders.png" alt="VS Solution Sync Folders" width="234" height="283" /></a><p class="wp-caption-text">Only folders can be kept in sync</p></div>
<div id="attachment_257" style="width: 864px" class="wp-caption alignnone"><a href="http://blog.peplau.com.br/wp-content/uploads/VS-Sync-project-Setup.png"><img class="wp-image-257 size-full" src="http://blog.peplau.com.br/wp-content/uploads/VS-Sync-project-Setup.png" alt="VS Sync project Setup" width="854" height="346" /></a><p class="wp-caption-text">At the solutions I&#8217;ve tested these are the folders I had to keep in sync to start taking advantage of the tool</p></div>
<h3>Performance</h3>
<p>The tool also starts deploying your changes as soon as you save it, although I have noticed sometimes a certain delay, generally not bigger than 10 seconds tho, which is acceptable compared to a normal build.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.peplau.com.br/avoiding-iis-restarts-in-a-separated-code-environment-now-with-sitecore-rocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio Solution at Sitecore Projects - Avoiding IIS restarts with Robocopy in a Post Build event</title>
		<link>https://blog.peplau.com.br/visual-studio-solution-at-sitecore-projects-avoiding-iis-restarts-with-robocopy-in-a-post-build-event/</link>
		<comments>https://blog.peplau.com.br/visual-studio-solution-at-sitecore-projects-avoiding-iis-restarts-with-robocopy-in-a-post-build-event/#comments</comments>
		<pubDate>Sat, 11 Apr 2015 00:47:22 +0000</pubDate>
		<dc:creator><![CDATA[Rodrigo Peplau]]></dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.peplau.com.br/?p=196</guid>
		<description><![CDATA[<div class="lr_horizontal_share" data-share-url="https://blog.peplau.com.br/visual-studio-solution-at-sitecore-projects-avoiding-iis-restarts-with-robocopy-in-a-post-build-event/"></div>As very well described by Sean Kearney at this great post, there are two ways to setup a Sitecore solution on Visual Studio for development: 1) Your solution, and code, is fully immersed in the Sitecore web site; 2) Your solution, and code, is outside of Sitecore&#8217;s web site and you use some post build process to deploy. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>As very well described by Sean Kearney at <a href="http://seankearney.com/post/Visual-Studio-Projects-and-Sitecore" target="_blank">this great post</a>, there are two ways to setup a Sitecore solution on Visual Studio for development:</p>
<blockquote><p>1) Your solution, and code, is fully immersed in the Sitecore web site;<br /> 2) Your solution, and code, is outside of Sitecore&#8217;s web site and you use some <strong>post build process</strong> to deploy.</p>
</blockquote>
<p>His post supports second option, which indeed has advantages over the first, however a huge drawback (specially for those without SSD) makes our life harder: due to the <strong>post build deployment</strong>, IIS is constantly forced to restart on every build you make.</p>
<p>In order to handle that issue I&#8217;ve invested some time looking for a better way to deploy. What if I copy only the modified changes instead of everything? Perhaps I could often skip the files that causes restarts, such as DLLs and config files&#8230;</p>
<h4>Robocopy</h4>
<p>My solution lied on <a href="https://technet.microsoft.com/en-us/library/cc733145.aspx" target="_blank">robocopy</a>, for advanced file copying. At your website project on Visual Studio, put this command at the Post-build event command line box:</p>
<blockquote><p>robocopy &#8220;$(ProjectDir).&#8221; &#8220;C:\inetpub\wwwroot\YourProject\Website&#8221; /E /FFT /XO<br /> exit 0</p>
</blockquote>
<ul>
<li> Parameters:
<ul>
<li><strong>/E</strong> &#8211; Copies subdirectories;</li>
<li><strong>/XO</strong> &#8211; Excludes older files &#8211; this is the trick, skipping old files;</li>
<li><strong>/FFT</strong> &#8211; Assumes FAT file times (two-second precision) &#8211; this somehow interferes on how robocopy defines what is &#8220;older&#8221; to be copied;</li>
<li><strong>exit 0</strong> &#8211; If we don&#8217;t add this to the end of the script, our Continuos Integration server breaks because robocopy returns a code different than &#8220;0&#8221; as success.</li>
</ul>
</li>
</ul>
<p>In my experience, even when you re-compile the solution without changing anything at the code, your IIS will not restart.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.peplau.com.br/visual-studio-solution-at-sitecore-projects-avoiding-iis-restarts-with-robocopy-in-a-post-build-event/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
