Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

Write Assembly Versions

Updates AssemblyVersion, AssemblyFileVersion, and AssemblyInformationalVersion Attributes (in AssemblyInfo source files).

Script usage:

DotNet::Write-AssemblyVersion(
	[AssemblyVersion: <text>],
	[FileVersion: <text>],
	[InformationalVersion: <text>],
	[FromDirectory: <text>],
	[Include: <@(text)>],
	[Exclude: <@(text)>]
);

Arguments:

NameFormatScript UsageUsage Notes
Assembly version
text
AssemblyVersion
Default value is "$ReleaseNumber.$PackageNumber".
File version
text
FileVersion
Value note: "same as AssemblyVersion".
Informational version
text
InformationalVersion
Value note: "same as AssemblyVersion".
From directory
text
FromDirectory
Value note: "$WorkingDirectory".
Include
@(text)
Include
See KB#1119 to learn more about masking syntax. Default value is "**\AssemblyInfo.cs".
Exclude
@(text)
Exclude

Note: This operation is intended to be used when assembly version attributes are stored directly in AssemblyInfo.cs. To set these values in the project file instead, use DotNet::SetProjectVersion.