FileClassifier Task
The FileClassifier task classifies a set of source resources as those that will be embedded into an assembly. If a resource is not localizable, it is embedded into the main application assembly; otherwise, it is embedded into a satellite assembly.
Parameter | Description |
|---|---|
CLREmbeddedResource | Unused. |
CLRResourceFiles | Unused. |
CLRSatelliteEmbeddedResource | Unused. |
Culture | Optional String parameter. Specifies the culture for the build. This value can be null if the build is non-localizable. If null, the default value is the lowercase value that CultureInfo.InvariantCulture returns. |
MainEmbeddedFiles | Optional ITaskItem[] output parameter. Specifies the non-localizable resources that are embedded into the main assembly. |
OutputType | Required String parameter. Specifies the type of file to embed the specified source files into. The valid values are exe, winexe, or library. |
SatelliteEmbeddedFiles | Optional ITaskItem[] output parameter. Specifies the localizable files that are embedded into the satellite assembly for the culture specified by the Culture parameter. |
SourceFiles | Required ITaskItem[] parameter. Specifies the list of files to classify. |
The following example classifies a single source file as a resource and then embeds it in a satellite assembly for the French-Canadian (fr-CA) culture.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask
TaskName="Microsoft.Build.Tasks.Windows.FileClassifier"
AssemblyFile="C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationBuildTasks.dll" />
<ItemGroup>
<Resource Include="Resource1.bmp" />
</ItemGroup>
<Target Name="FileClassifierTask">
<FileClassifier
SourceFiles="Resource1.bmp"
Culture="fr-CA"
OutputType="exe" />
</Target>
</Project>