Note: This API documentation is for FAKE version 4. The migration API documentation can be found here. The API documentation for the new fake 5 modules can be found here

AssemblyInfoFile

Contains tasks to generate AssemblyInfo files for C# and F#. There is also a tutorial about the AssemblyInfo tasks available.

Nested types and modules

TypeDescription
AssemblyInfoFileConfig

Represents options for configuring the emission of AssemblyInfo

Attribute

Represents AssemblyInfo attributes

Functions and values

Function or valueDescription
CreateCppCliAssemblyInfo(...)
Signature: outputFileName:string -> attributes:seq<Attribute> -> unit

Creates a C++/CLI AssemblyInfo file with the given attributes.

CreateCppCliAssemblyInfoWithConfig(...)
Signature: outputFileName:string -> attributes:seq<Attribute> -> config:AssemblyInfoFileConfig -> unit

Creates a C++/CLI AssemblyInfo file with the given attributes and configuration. Does not generate an AssemblyVersionInformation class.

CreateCSharpAssemblyInfo(...)
Signature: outputFileName:string -> attributes:seq<Attribute> -> unit

Creates a C# AssemblyInfo file with the given attributes. The generated AssemblyInfo file contains an AssemblyVersionInformation class which can be used to retrieve the current version no. from inside of an assembly.

CreateCSharpAssemblyInfoWithConfig(...)
Signature: outputFileName:string -> attributes:seq<Attribute> -> config:AssemblyInfoFileConfig -> unit

Creates a C# AssemblyInfo file with the given attributes and configuration. The generated AssemblyInfo file contains an AssemblyVersionInformation class which can be used to retrieve the current version no. from inside of an assembly.

CreateFSharpAssemblyInfo(...)
Signature: outputFileName:string -> attributes:seq<Attribute> -> unit

Creates a F# AssemblyInfo file with the given attributes. The generated AssemblyInfo file contains an AssemblyVersionInformation class which can be used to retrieve the current version no. from inside of an assembly.

CreateFSharpAssemblyInfoWithConfig(...)
Signature: outputFileName:string -> attributes:seq<Attribute> -> config:AssemblyInfoFileConfig -> unit

Creates a F# AssemblyInfo file with the given attributes and configuration. The generated AssemblyInfo file contains an AssemblyVersionInformation class which can be used to retrieve the current version no. from inside of an assembly.

CreateVisualBasicAssemblyInfo(...)
Signature: outputFileName:string -> attributes:seq<Attribute> -> unit

Creates a VB AssemblyInfo file with the given attributes. The generated AssemblyInfo file contains an AssemblyVersionInformation class which can be used to retrieve the current version no. from inside of an assembly.

CreateVisualBasicAssemblyInfoWithConfig(...)
Signature: outputFileName:string -> attributes:seq<Attribute> -> config:AssemblyInfoFileConfig -> unit

Creates a VB AssemblyInfo file with the given attributes and configuration. The generated AssemblyInfo file contains an AssemblyVersionInformation class which can be used to retrieve the current version no. from inside of an assembly.

GetAttribute attrName assemblyInfoFile
Signature: attrName:string -> assemblyInfoFile:string -> Attribute option

Read a single attribute from an AssemblyInfo file.

Parameters

  • attrName - Name of the attribute without "Attribute" at the end.
  • assemblyInfoFile - The file to read from. Language C#, F#, VB or C++ is determined from the extension.
GetAttributes(assemblyInfoFile)
Signature: assemblyInfoFile:string -> seq<Attribute>

Read attributes from an AssemblyInfo file and return as a sequence of Attribute.

Parameters

  • assemblyInfoFile - The file to read attributes from. Language C#, F#, VB or C++ is determined from the extension.
GetAttributeValue(...)
Signature: attrName:string -> assemblyInfoFile:string -> string option

Read the value of a single attribute from an AssemblyInfo file. Note that string values are returned with surrounding "".

Parameters

  • attrName - Name of the attribute without "Attribute" at the end.
  • assemblyInfoFile - The file to read from. Language C#, F#, VB or C++ is determined from the extension.
UpdateAttributes(...)
Signature: assemblyInfoFile:string -> attributes:seq<Attribute> -> unit

Update a set of attributes in an AssemblyInfo file. Fails if any attribute is not found.

Parameters

  • assemblyInfoFile - The file to update. Language C#, F#, VB or C++ is determined from the extension.
  • attributes - The Attributes that should be updated matched on Name (Namespace is not used).

Active patterns

Active patternDescription
( |Fsproj|Csproj|Vbproj|Shproj| )(...)
Signature: projFileName:string -> Choice<unit,unit,unit,unit>