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.
Task parameters
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. |
Remarks
If the Culture parameter is not set, all resources that are specified by using the SourceFiles parameter are non-localizable; otherwise, they are localizable, unless they are associated with a Localizable attribute that is set to false.
Example
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>