TDS and Sitecore.* DLLs

Posted 05/15/2012 by techphoria414

Posted in

One fail-safe feature of Team Development for Sitecore that has bit me a few times is its prevention of Sitecore.* DLLs from copying to your web root during a build. Though I appreciate TDS lookin out, there are times when you have non-module libraries, or modified Shared Source libraries, that you do want deployed on build. To work around this, you can utilize the BeforeFileReplacements build target. Place the following in your TDS csproj, just before the closing </Project>, and edit DeploySitecoreBinaries as needed for your assemblies.

<Target Name="BeforeFileReplacements">
    <!-- restore certain Sitecore.* DLLs that TDS does not 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;
$(SourceWebPhysicalPath)\Bin\Sitecore.Sharedsource.dll;
$(SourceWebPhysicalPath)\Bin\Sitecore.Sharedsource.PartialLanguageFallback.dll;" />
    </ItemGroup>
    <Copy SourceFiles="@(DeploySitecoreBinaries)"
DestinationFiles="@(DeploySitecoreBinaries->'$(_OutputPath)bin\%(RecursiveDir)%(FileName)%(Extension)')" />
  </Target>

Share:

Pre-Disqus Comments

  • Kyle Heon's gravatar Kyle Heon said:
    5/16/2012 4:23 AM

    Thanks Nick!

  • Sean Kearney's gravatar Sean Kearney said:
    5/15/2012 10:21 AM

    Ah... yes. If you are using TDS v3 or older that is the case. I've been using V4 internally I forgot about that change! V4 has full support for the "All Configurations" setting. Thanks for the correction!

  • Nick Wesselman's gravatar Nick Wesselman said:
    5/15/2012 10:14 AM

    Thanks Sean, however don't file replacements need to be maintained for every build target?

  • Sean Kearney's gravatar Sean Kearney said:
    5/15/2012 9:52 AM

    Nick, Creative use of the exposed Target, but you should have been able to use the file replacements feature too. Sean

Sitecore MVP

Popular Posts

Archive

Syndication