Adds a setting override to the answer file for the component specified by an identity. Creates or returns an existing setting override specified by a path and a configuration pass. Internally, creates all parent overrides if necessary. Namespace: Microsoft.ComponentStudio.ComponentPlatformInterface
Assembly: Microsoft.ComponentStudio.ComponentPlatformInterface (in microsoft.componentstudio.componentplatforminterface.dll)


Visual Basic
Dim identity As Identity
Dim path As String
Dim configurationPass As ConfigurationPass
Dim createOption As CreateOptions
Dim returnValue As AnswerFileSettingOverride
Dim answerFileSettingOverrideCollection1 As AnswerFileSettingOverrideCollection
returnValue = answerFileSettingOverrideCollection1.Create(identity, path, configurationPass, createOption)


Visual Basic
Public Function Create( _
		ByVal identity As Identity, _
		ByVal path As String, _
		ByVal configurationPass As ConfigurationPass, _
		ByVal createOption As CreateOptions _
) As AnswerFileSettingOverride
public AnswerFileSettingOverride Create(
		Identity identity, 
		string path, 
		ConfigurationPass configurationPass, 
		CreateOptions createOption
AnswerFileSettingOverride^ Create(
		Identity^ identity,
		String^ path,
		ConfigurationPass configurationPass,
		CreateOptions createOption
public AnswerFileSettingOverride Create(
		Identity identity, 
		System.String path, 
		ConfigurationPass configurationPass, 
		CreateOptions createOption
public function Create(
		 identity : Identity, 
		 path : String, 
		 configurationPass : ConfigurationPass, 
		 createOption : CreateOptions
) : AnswerFileSettingOverride;



Identity of the component


Path to the setting


Configuration pass


Enumeration element that determines whether to return the existing setting override or throw an exception when one already exists.

Return Value

An instance of SettingOverride.


An exception from Troubleshooting System.InvalidOperationException Exceptions is thrown if there is already a setting override for the specified parameter.

System.ArgumentNullException is thrown if identity or path is null or empty.

System.InvalidOperationException is thrown if the override cannot be created (for example, if the maximum number of occurrences has been reached), or the setting override already exists and the value of CreateOptions is FailIfExists.

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.


Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Vista, and Windows 2000

Target Platforms

See Also