TDS and Sitecore.* DLLs

Mon Sep 12 2011

Quick one for you. If you're using TDS for Sitecore, you've no doubt run into the issue that any DLLs starting with Sitecore.* will not deploy. Though an admirable protection against deployment of core Sitecore DLLs, it can be an issue with Shared Source modules that are not installed through packages, or Sitecore.Support.* DLLs. The quick fix is to unload your TDS project and edit its .csproj, and add a BeforeFileReplacements event handler such as the following.

  <Target Name="BeforeFileReplacements">
<!-- restore certain Sitecore.* DLLs that TDS refuses to copy -->
<!-- BeforeFileReplacements will be called after TDS has deleted Sitecore.*
from its Output, but before it deploys -->
<DeploySitecoreBinaries Include="$(SourceWebPhysicalPath)\Bin\Sitecore.SharedSource.Search.dll;" />
<Copy SourceFiles="@(DeploySitecoreBinaries)"
DestinationFiles="@(DeploySitecoreBinaries->'$(_OutputPath)bin\%(RecursiveDir)%(FileName)%(Extension)')" />

UPDATE 9/14/2011: Changed the name of the Item Group. It was deploying everything in the bin\ folder, including Sitecore.Kernel. I assume because the group name SourceWebBinaries was previously used by TDS.

Nick / @techphoria414

Nick Wesselman

Nick Wesselman started working professionally in software development just a few days after everyone realized we dodged a bullet with the Y2k bug. He’s worked as a Sitecore solution partner, Technology partner, and now for Sitecore itself. He lives with his wife, son, and daughter in Asheville, NC.