SGen Class

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Implements the SGen task. Use the SGen element in your project file to create and execute this task. For usage and parameter information, see SGen Task.

MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Inheritance Hierarchy

System.Object
  Microsoft.Build.Utilities.Task
    Microsoft.Build.Utilities.ToolTask
      Microsoft.Build.Tasks.ToolTaskExtension
        Microsoft.Build.Tasks.SGen

Namespace:  Microsoft.Build.Tasks
Assembly:  Microsoft.Build.Tasks.Core (in Microsoft.Build.Tasks.Core.dll)

Syntax

'Declaration
Public Class SGen _
    Inherits ToolTaskExtension
public class SGen : ToolTaskExtension
public ref class SGen : public ToolTaskExtension
type SGen =  
    class 
        inherit ToolTaskExtension 
    end
public class SGen extends ToolTaskExtension

The SGen type exposes the following members.

Constructors

  Name Description
Public method SGen Infrastructure. Initializes a new instance of the SGen class.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Top

Properties

  Name Description
Protected property Bag Infrastructure. Gets the collection of parameters used by the derived task class.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTaskExtension.)
Public property BuildAssemblyName Infrastructure. Gets or sets the assembly to generate serialization code for.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property BuildAssemblyPath Infrastructure. Gets or sets the path to the assembly to generate serialization code for.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property BuildEngine Gets or sets the instance of the IBuildEngine object used by the task.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from Task.)
Public property BuildEngine2 Gets the instance of the IBuildEngine2 object used by the task.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from Task.)
Public property BuildEngine3 Gets the instance of the IBuildEngine3 object used by the task.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from Task.)
Public property BuildEngine4 Gets the instance of the IBuildEngine4 object used by the task.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from Task.)
Public property DelaySign Infrastructure. Gets or sets a Boolean value that specifies whether the SGen task places the public key in the assembly (true) or fully signs the assembly (false).MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property EchoOff Indicates that command line echoing is turned off.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected property EnvironmentOverride Obsolete. Gets a set of environment variable name-value pairs. Designed to be overridden in a custom task class (derived from ToolTask) to return a set of new or altered environment variables to create the execution context of the associated tool. MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public property EnvironmentVariables Array of equals-separated pairs of environment variables that should be passed to the spawned executable, in addition to (or selectively overriding) the regular environment block.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public property ExitCode Gets the returned exit code of the executable file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected property HasLoggedErrors Infrastructure. Returns whether this ToolTask has logged any errors.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTaskExtension.)
Protected property HelpKeywordPrefix Gets or sets the prefix used to compose Help keywords from resource names.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from Task.)
Public property HostObject Gets or sets the host object associated with the task.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from Task.)
Public property KeyContainer Infrastructure. Gets or sets a container that holds a key pair. MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property KeyFile Infrastructure. Gets or sets a key pair or a public key to use to sign an assembly. MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property Log Gets an instance of a TaskLoggingHelperExtension class containing task logging methods.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTaskExtension.)
Public property LogStandardErrorAsError Should ALL messages received on the standard error stream be logged as errors.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public property Platform Gets or sets the compiler platform to use to generate the output assembly.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property References Infrastructure. Gets or sets the assemblies that are referenced by the types requiring XML serialization.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Protected property ResponseFileEncoding Gets the Encoding of the response file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public property SdkToolsPath Gets or sets the SDK Tools path.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property SerializationAssembly Infrastructure. Gets or sets the generated serialization assembly.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property SerializationAssemblyName Infrastructure. Gets the name of the generated serialization assembly.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property ShouldGenerateSerializer Infrastructure. Gets or sets a Boolean value that specifies whether the SGen task should generate a serialization assembly.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Protected property StandardErrorEncoding Gets the Encoding of the standard error stream of the task.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public property StandardErrorImportance Task Parameter: Importance with which to log text from the standard error stream.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected property StandardErrorImportanceToUse Gets the actual importance at which standard error messages will be logged.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected property StandardErrorLoggingImportance Gets the MessageImportance with which to log errors.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected property StandardOutputEncoding Gets the Encoding of the standard output stream of the task.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public property StandardOutputImportance Task Parameter: Importance with which to log text from the standard out stream.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected property StandardOutputImportanceToUse Gets the actual importance at which standard out messages will be logged.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected property StandardOutputLoggingImportance Gets the MessageImportance with which to log errors.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected property TaskProcessTerminationTimeout A timeout to wait for a task to terminate before killing it. In milliseconds.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected property TaskResources Gets or sets the culture-specific resources associated with the task.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from Task.)
Public property Timeout Gets or sets the amount of time after which the task executable is terminated.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected property ToolCanceled Used to signal when a tool has been cancelled.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public property ToolExe Projects may set this to override a task's ToolName. Tasks may override this to prevent that.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected property ToolName Infrastructure. Gets the name of the tool executable file (sgen.exe).MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Overrides ToolTask.ToolName.)
Public property ToolPath Gets or sets the path of the executable file to run.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public property Types Gets or sets a list of specific types to generate serialization code for. SGen generates code only for these types.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property UseCommandProcessor Gets or sets a switch that specifies whether the tool task will create a batch file for the command-line and execute that using the command-processor, rather than executing the command directly.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public property UseKeep Sets the /keep parameter. For more information about parameters, see XML Serializer Generator Tool (Sgen.exe).
Public property UseProxyTypes Infrastructure. Gets or sets a Boolean value that specifies whether the SGen task generates serialization code only for the XML Web service proxy types.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property YieldDuringToolExecution Indicates if the task will yield the node during tool execution.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)

Top

Methods

  Name Description
Protected method AddCommandLineCommands Infrastructure. Fills the specified CommandLineBuilderExtension with the switches and other information that the command line tool must run from the command line and not from a response file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTaskExtension.)
Protected method AddResponseFileCommands Infrastructure. Fills the specified CommandLineBuilderExtension with the switches and other information that the command line tool can run from a response file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTaskExtension.)
Protected method CallHostObjectToExecute Calls the host object to perform the work of the task.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public method Cancel Cancels the process executing the task by asking it to close nicely, then after a short period, forcing termination.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected method DeleteTempFile Deletes the specified temporary file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public method Equals (Inherited from Object.)
Public method Execute Runs the exectuable file with the specified task parameters.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected method ExecuteTool Creates a temporoary response (.rsp) file and runs the executable file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected method Finalize (Inherited from Object.)
Protected method GenerateCommandLineCommands Infrastructure. Gets the switches and other information that the command line tool must run directly from the command line and not from a response file.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Overrides ToolTaskExtension.GenerateCommandLineCommands().)
Protected method GenerateFullPathToTool Infrastructure. Gets the full file path of the SGen tool.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Overrides ToolTask.GenerateFullPathToTool().)
Protected method GenerateResponseFileCommands Infrastructure. Gets the switch used by the command line tool to specify the response file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTaskExtension.)
Protected method GetBoolParameterWithDefault Infrastructure. Gets the value of the specified Boolean parameter.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTaskExtension.)
Public method GetHashCode (Inherited from Object.)
Protected method GetIntParameterWithDefault Infrastructure. Gets the value of the specified integer parameter.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTaskExtension.)
Protected method GetProcessStartInfo Initializes the information required to spawn the process executing the tool.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected method GetResponseFileSwitch Returns the command line switch used by the executable file to specifiy a response (.rsp) file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Public method GetType (Inherited from Object.)
Protected method GetWorkingDirectory Returns the directory in which to run the executable file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected method HandleTaskExecutionErrors Handles execution errors raised by the executable file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected method InitializeHostObject Initializes the host object of the task.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected method LogEventsFromTextOutput Parses a single line of text to identify any errors or warnings in canonical format.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected method LogPathToTool Logs the tool name and path to all registered loggers.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected method LogToolCommand Logs the starting point of the run to all registered loggers.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method ResponseFileEscape Overridable method to escape the content of the response file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ToolTask.)
Protected method SkipTaskExecution Infrastructure. Indicates whether task execution should be skipped.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Overrides ToolTask.SkipTaskExecution().)
Public method ToString (Inherited from Object.)
Protected method ValidateParameters Infrastructure. Validates input parameters and logs errors or warnings, if any. Returns a Boolean value that indicates whether task execution should proceed.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Overrides ToolTask.ValidateParameters().)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Build.Tasks Namespace