Skip to content

Instantly share code, notes, and snippets.

@JamesSkemp
Created October 20, 2016 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamesSkemp/69a567b7aba6072075ed4417708fbb06 to your computer and use it in GitHub Desktop.
Save JamesSkemp/69a567b7aba6072075ed4417708fbb06 to your computer and use it in GitHub Desktop.
Visual Studio publishing profile example for SwitchMasterToWeb.config.example rename
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>C:\path\to\publish</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
<ExcludeFilesFromDeployment>
App_Config\Include\FXM\Sitecore.FXM.Lucene.DomainsSearch.Index.Master.config;App_Config\Include\Sitecore.ContentSearch.Lucene.Index.Core.config;App_Config\Include\Sitecore.ContentSearch.Lucene.Index.Master.config;App_Config\Include\Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Lucene.Index.Master.config;App_Config\Include\Sitecore.Marketing.Lucene.Index.Master.config;App_Config\Include\Sitecore.Processing.config
</ExcludeFilesFromDeployment>
</PropertyGroup>
<!-- This will rename SwitchMasterToWeb.config.example to SwitchMasterToWeb.config when publishing via this profile. -->
<Target Name="EnableSwitchMasterToWebConfig" AfterTargets="GatherAllFilesToPublish">
<Move Condition="'$(Configuration)' == 'Release'"
SourceFiles="obj\$(ConfigurationName)\Package\PackageTmp\App_Config\Include\Z.SwitchMasterToWeb\SwitchMasterToWeb.config.example"
DestinationFiles="obj\$(ConfigurationName)\Package\PackageTmp\App_Config\Include\Z.SwitchMasterToWeb\SwitchMasterToWeb.config" />
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment