Skip to content

Instantly share code, notes, and snippets.

@jclagache
Last active December 20, 2017 10:30
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 jclagache/991a72ba25333f617a6d0371f897e780 to your computer and use it in GitHub Desktop.
Save jclagache/991a72ba25333f617a6d0371f897e780 to your computer and use it in GitHub Desktop.
akka.config transformations
<?xml version="1.0" encoding="utf-8" ?>
<akka>
<hocon>
<![CDATA[
akka
{
loglevel = DEBUG
}
]]>
</hocon>
</akka>
<?xml version="1.0"?>
<!-- For more information on using app.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<akka xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<hocon xdt:Transform="Replace">
<![CDATA[
akka
{
loglevel = ERROR
}
]]>
</hocon>
</akka>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="akka" type="Akka.Configuration.Hocon.AkkaConfigurationSection, Akka" />
</configSections>
<akka configSource="akka.config"/>
</configuration>
<ItemGroup>
<Content Include="akka.config">
</Content>
<None Include="akka.Release.config">
<DependentUpon>akka.config</DependentUpon>
<SubType>Designer</SubType>
</None>
<ItemGroup>
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.Tasks.dll" />
<Target Name="AfterBuild">
<TransformXml Source="akka.config" Destination="$(OutputPath)akka.config" Transform="akka.$(Configuration).config" Condition="Exists('akka.$(Configuration).config')" />
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment