Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here

OBSOLETE

This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.

ConfigurationHelper

Contains functions which allow to read and write config files.

Functions and values

Function or valueDescription
applyXslOnConfig xsl fileName
Signature: xsl:string -> fileName:string -> unit
Attributes:
[<Obsolete("This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.")>]
OBSOLETE

This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.

Applies a Xsl Stylesheet to a config file and writes it back.

Parameters

  • xsl - The Xsl stylesheet to apply.
  • fileName - The file name of the config file.

Sample

1: 
applyXslOnConfig (navServicePath @@ DEV.xsl) (navServicePath @@ "CustomSettings.config")
readConfig(fileName)
Signature: fileName:string -> XmlDocument
Attributes:
[<Obsolete("This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.")>]
OBSOLETE

This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.

Reads a config file into an XmlDocument.

Parameters

  • fileName - The file name of the config file.
updateApplicationSetting(...)
Signature: fileName:string -> settingName:string -> value:string -> unit
Attributes:
[<Obsolete("This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.")>]
OBSOLETE

This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.

Reads a config file from the given file name, replaces the Application Setting (as opposed to AppSetting) value and writes it back.

Parameters

  • settingName - The ApplicationSetting name for which the value should be replaced.
  • value - The new ApplicationSetting value.
  • fileName - The file name of the config file.

Sample

1: 
updateApplicationSetting "DatabaseName" targetDatabase (navServicePath @@ "CustomSettings.config")
updateAppSetting key value fileName
Signature: key:string -> value:string -> fileName:string -> unit
Attributes:
[<Obsolete("This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.")>]
OBSOLETE

This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.

Reads a config file from the given file name, replaces the app setting value and writes it back.

Parameters

  • key - The AppSettings attribute key name for which the value should be replaced.
  • value - The new AppSettings attribute value.
  • fileName - The file name of the config file.

Sample

1: 
updateAppSetting "DatabaseName" targetDatabase (navServicePath @@ "CustomSettings.config")
updateConfig(...)
Signature: xpath:string -> attribute:string -> value:string -> config:XmlDocument -> XmlDocument
Attributes:
[<Obsolete("This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.")>]
OBSOLETE

This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.

Reads a config file from the given file name, replaces an attribute using the given xPath and writes it back.

Parameters

  • xpath - An XPath term which can be used to replace the attribute.
  • attribute - The attribute name for which the value should be replaced.
  • value - The new attribute value.
  • config - The XElement representing the config.
updateConfigSetting(...)
Signature: fileName:string -> xpath:string -> attribute:string -> value:string -> unit
Attributes:
[<Obsolete("This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.")>]
OBSOLETE

This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.

Reads a config file from the given file name, replaces an attribute using the given xPath and writes it back.

Parameters

  • fileName - The file name of the config file.
  • xpath - An XPath term which can be used to replace the attribute.
  • attribute - The attribute name for which the value should be replaced.
  • value - The new attribute value.
updateConnectionString(...)
Signature: connectionStringKey:string -> value:string -> fileName:string -> unit
Attributes:
[<Obsolete("This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.")>]
OBSOLETE

This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.

Reads a config file from the given file name, replaces the connection string value and writes it back.

Parameters

  • connectionStringKey - The connection string key name for which the value should be replaced.
  • value - The new connection string value.
  • fileName - The file name of the config file.
writeConfig fileName config
Signature: fileName:string -> config:XmlDocument -> unit
Attributes:
[<Obsolete("This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.")>]
OBSOLETE

This API is obsolete. There is no alternative in FAKE 5 yet. You can help by porting this module.

Writes an XmlDocument to a config file.

Parameters

  • fileName - The file name of the config file.
  • config - The XmlDocument representing the config.