SkillAgentSearch skills...

MSBuildExtensions

MSBuild targets for updating Assembly version during build process.

Install / Use

/learn @footcha/MSBuildExtensions
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

MSBuild.AssemblyVersion

MSBuild targets for updating Assembly version and optionally Assembly Informational Version during build process. AssemblyInfo can be set by initializing MSBuild property $(AssemblyVersionNumber) and optionally $(AssemblyInformationalVersion) before MSBuild target AssemblyVersionUpdate is called.

Examples

Example 1: Initialize property $(AssemblyVersionNumber) from command line:

msbuild.exe MySolution.sln /p:AssemblyVersionNumber=1.2.3.4

Or with AssemblyInformationalVersion.

msbuild.exe MySolution.sln /p:AssemblyVersionNumber=1.2.3.4 /p:AssemblyInformationalVersion=1.2.3-alpha

Example 2: Initialize or update property $(AssemblyVersionNumber) and optionally $(AssemblyInformationalVersion) declaratively in MSBuild project or a referenced .props file:

<PropertyGroup>
    <AssemblyVersionNumber>1.2.3.4</AssemblyVersionNumber>
    <AssemblyInformationalVersion>1.2.3.4-alpha</AssemblyInformationalVersion>
</PropertyGroup>

Example 3: Update property $(AssemblyVersionNumber) and optionally $(AssemblyInformationalVersion) in a custom target:

<Target Name="MyCustomUpdateAssemblyVersionNumber"
        BeforeTargets="AssemblyVersionUpdate">
    <PropertyGroup>
        <AssemblyVersionNumber>1.2.3.4</AssemblyVersionNumber>
         <AssemblyInformationalVersion>1.2.3.4-alpha</AssemblyInformationalVersion>
     </PropertyGroup>
</Target>

Related Skills

View on GitHub
GitHub Stars8
CategoryDevelopment
Updated9mo ago
Forks6

Languages

C#

Security Score

77/100

Audited on Jun 10, 2025

No findings