Skip to content

SaggioTechnologies/AssemblyInfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AssemblyInfo

Queries the AssemblyInfo of a .NET assembly and formats the output according to you. This is very useful for things like build scripts.

Download Latest Release

Usage:

AssemblyInfo.exe MyAssembly.dll -t "$major.$minor"

Outputs:

1.2

###Token List

  • $major - Major version number
  • $minor - Minor version number
  • $revision - Revision version number
  • $build - Build version number
  • $productversion - The full production version
  • $informationalversion - The informational version (e.g. 2.3 Hotfix1 or 3.4-rc1)
  • $fullname - (MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=de53a01bd32ea25b)

Example:

AssemblyInfo.exe MyAssembly.dll -t "$fullname"

Outputs:

MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=de53a01bd32ea25b

Example:

AssemblyInfo.exe MyAssembly.dll -t "$major.$minor-$revision"

Outputs:

1.0-3

Example:

AssemblyInfo.exe MyAssembly.dll -t "$informationalversion"

Outputs:

3.5-rc1

(works if the assembly has the AssembyInformationalVersion attribute set)

Example (multi-line):

AssemblyInfo.exe MyAssembly.dll -t "$major.$minor\r\nI like spaghetti"

Outputs:

1.2
I like spaghetti

How to use it in a batch file (like a build script)

for /f "delims=" %%i in ('AssemblyInfo MyAssembly.dll -t $informationalversion') do set VERSION=%%i
ECHO %VERSION%

About

Queries the AssemblyInfo of a .NET assembly and formats the output according to you. Useful in batch files (.bat)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages