TDS and Sitecore.* DLLs
Posted 9/12/2011 by techphoria414
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 -->
<ItemGroup>
<DeploySitecoreBinaries Include="$(SourceWebPhysicalPath)\Bin\Sitecore.SharedSource.Search.dll;" />
</ItemGroup>
<Copy SourceFiles="@(DeploySitecoreBinaries)"
DestinationFiles="@(DeploySitecoreBinaries->'$(_OutputPath)bin\%(RecursiveDir)%(FileName)%(Extension)')" />
</Target>
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.
Enjoy,
Nick / @techphoria414