This topic has not yet been rated - Rate this topic

PartialClassGenerationTask Class

This task accesses XAML files that define types (with x:Class) and generates the corresponding source code that can be compiled into an assembly.

System.Object
  Microsoft.Build.Utilities.Task
    Microsoft.Build.Tasks.Xaml.PartialClassGenerationTask

Namespace:  Microsoft.Build.Tasks.Xaml
Assembly:  XamlBuildTask (in XamlBuildTask.dll)
public class PartialClassGenerationTask : Task

The PartialClassGenerationTask type exposes the following members.

  Name Description
Public method PartialClassGenerationTask Initializes a new instance of the PartialClassGenerationTask class.
Top
  Name Description
Public property ApplicationMarkup A list of XAML files to process, populated by MS Build.
Public property AssemblyName Gets or sets the name of the assembly being compiled.
Public property BuildEngine Gets or sets the instance of the IBuildEngine object used by the task. (Inherited from Task.)
Public property BuildEngine2 Gets the instance of the IBuildEngine2 object used by the task. (Inherited from Task.)
Public property BuildEngine3 Gets the instance of the IBuildEngine3 object used by the task. (Inherited from Task.)
Public property BuildTaskPath Gets or sets the path of the assembly that contains this build task.
Public property GeneratedCodeFiles Gets or sets a list of generated code files, one for each input file.
Public property GeneratedResources Gets or sets a list of XAML files that contain the markup for instantiating the newly generated types, one for each input file.
Public property GeneratedSourceExtension Gets or sets the file extension to add to the generated source files.
Protected property HelpKeywordPrefix Gets or sets the prefix used to compose Help keywords from resource names. (Inherited from Task.)
Public property HostObject Gets or sets the host object associated with the task. (Inherited from Task.)
Public property IsInProcessXamlMarkupCompile
Public property KnownReferencePaths Gets or sets the known reference paths.
Public property Language Gets or sets the language to generate source code in.
Public property Log Gets an instance of a TaskLoggingHelper class containing task logging methods. (Inherited from Task.)
Public property OutputPath Gets or sets the directory to place the generated files.
Public property References Gets or sets a list of assemblies to reference.
Public property RequiresCompilationPass2 Gets or sets a value that indicates whether this project requires executing the CompilationPass2Task task.
Public property RootNamespace Gets or sets the root namespace for the project.
Public property SourceCodeFiles Gets or sets a list of source code files in the project.
Protected property TaskResources Gets or sets the culture-specific resources associated with the task. (Inherited from Task.)
Top
  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method Execute Called by MS Build to execute the code generation task. (Overrides Task.Execute().)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top

The XAML files processed by this task define new types as well as instantiate those types. The PartialClassGenerationTask class reads in the new type definitions and generates source code files. In addition, it generates a XAML file that contains the markup that instantiates the newly generated types.

This task should not be used to consume untrusted XAML inputs.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ