This documentation is archived and is not being maintained.

MergeLocalizationDirectives Task

The MergeLocalizationDirectives task merges the localization attributes and comments of one or more XAML binary format files into a single file for the whole assembly.




Required ITaskItem[] parameter.

Specifies the list of localization directives files for individual files in XAML binary format.


Required String output parameter.

Specifies the output path of the compiled localization-directives assembly.

You can add localization attributes and comments to Extensible Application Markup Language (XAML) content. With Windows Presentation Foundation (WPF) localization support, you can strip out localization attributes and comments, and put them in a .loc file that is separate from the generated assembly. You can do this by using the LocalizationPropertyStorage attribute. For more information about localization attributes and comments, and LocalizationPropertyStorage, see Localization Attributes and Comments.

The following example merges the localization comments of several XAML binary format files into a single .loc file.

<Project xmlns="">
    AssemblyFile="C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationBuildTasks.dll" />
  <Target Name="MergeLocalizationDirectivesTask">
      OutputFile="obj\debug\WPFMSBuildSample.loc" />