AssemblyInfoHelper 5.4.0

dotnet add package AssemblyInfoHelper --version 5.4.0
                    
NuGet\Install-Package AssemblyInfoHelper -Version 5.4.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AssemblyInfoHelper" Version="5.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AssemblyInfoHelper" Version="5.4.0" />
                    
Directory.Packages.props
<PackageReference Include="AssemblyInfoHelper" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AssemblyInfoHelper --version 5.4.0
                    
#r "nuget: AssemblyInfoHelper, 5.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AssemblyInfoHelper@5.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AssemblyInfoHelper&version=5.4.0
                    
Install as a Cake Addin
#tool nuget:?package=AssemblyInfoHelper&version=5.4.0
                    
Install as a Cake Tool

AssemblyInfoHelper

GitHub Release Version GitHub License Nuget Version Nuget Downloads

Purpose

Version Info Display

Displays the assembly attributes of the assembly that calls this functions. This contains the following informations:

  • AssemblyTitle
  • AssemblyDescription
  • AssemblyCompany
  • AssemblyProduct
  • AssemblyCopyright
  • AssemblyTrademark
  • AssemblyVersion
  • AssemblyFileVersion (this attribute is only show if it differs from the AssemblyVersion)
  • AssemblyInformationalVersion
  • AssemblyCreationTime

General Infos

Readme Viewer

The Readme is get from the README.md file in the path given when creating the WindowAssemblyInfo or the application startup path.

This page is hidden if not file is found.

Readme

Changelog Viewer

The Changelog is get from the CHANGELOG.md file in the path given when creating the WindowAssemblyInfo or the application startup path.

This page is hidden if not file is found.

Changelog

GitHub Release Viewer

GitHub releases are taken from repository at the given URL (see usage below).

This page is hidden if not repository URL is assigned. This also disabled the complete update feature (see below).

GitHub Releases

The AssemblyInfoHelper.Demo is used to test the AssemblyInfoHelper.

Installation

Include the latest release from nuget.org in your project.

You can also use the Package Manager console with: PM> Install-Package AssemblyInfoHelper

Usage

Show WindowAssemblyInfo

The simplest way to show the WindowAssemblyInfo is to add a AppInfoButton control to the application. Everything is done inside this control.

xmlns:assemblyInfoHelper="clr-namespace:AssemblyInfoHelper;assembly=AssemblyInfoHelper"
...
<assemblyInfoHelper:AppInfoButton EnableNewVersionNotification="True"/>

AppInfoButton

Or you can open the info window with:

AssemblyInfoHelper.WindowAssemblyInfo window = new AssemblyInfoHelper.WindowAssemblyInfo();
window.ShowDialog();

GitHub Releases and Update Feature

To show all releases from GitHub, the repository URL must be assigned.

The easiest way is to set the RepositoryUrl in the .csproj file (see Add assembly attributes > New style Projects below). An embedded Nuget build target will make this setting available to the AssemblyInfoHelper.

The older alternative is to add the GitHubRepo attribute to the AssemblyInfo.cs file or anywhere else in your application (see Add assembly attributes > Old style Projects below).

Add assembly attributes

New style projects

Add the following properties to a .csproj file to include assembly attributes:

<PropertyGroup>
	<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
	<Title>TitleText</Title>
	<Description>DescriptionText</Description>
	<Company>CompanyText</Company>
	<Product>ProductText</Product>
	<Copyright>Copyright © 2022</Copyright>
	<RepositoryUrl>https://github.com/M1S2/AssemblyInfoHelper</RepositoryUrl>
</PropertyGroup>

Old style projects

Add the following lines to the AssemblyInfo.cs file to include assembly attributes:

[assembly: AssemblyTitle("TitleText")]
[assembly: AssemblyDescription("DescriptionText")]
[assembly: AssemblyCompany("CompanyText")]
[assembly: AssemblyProduct("ProductText")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("TrademarkText")]
[assembly: AssemblyInfoHelper.GitHub.GitHubRepo("https://github.com/M1S2/AssemblyInfoHelper")]

Update Feature

You can see and download all releases available on GitHub on the GitHub releases tab. To Upgrade/Repair/Downgrade click on the button beside the corresponding release. The release is downloaded from GitHub and installed automatically depending if an installer or binaries are available.

The release binaries must be added to a GitHub release as asset. The following naming conventions are used to detect, what type of asset it is:

For binaries:

  • %ProjectName%_Binaries.zip
  • %ProjectName%.zip
  • %ProjectName%_%Version%.zip (e.g. %ProjectName%_v1.0.0.zip)
  • bin.zip

For installer:

  • %ProjectName%_Installer.zip
  • Installer.zip
  • Setup.zip
  • Setup.exe

Persistent files during update

If files should be preserved during the update process, the UpdatePersistentFiles attribute can be added to the AssemblyInfo.cs file:

[assembly: AssemblyInfoHelper.GitHub.UpdatePersistentFiles("Filename.txt")]

Adapt the "Filename.txt" to the file you want to keep. The filename is relative to the executing assembly. E.g. if you want to keep a database file named "Database.db" that is located beside the executable "DemoApp.exe", use "Database.db" with the UpdatePersistentFiles attribute.

If multiple files should be kept, add one UpdatePersistentFiles attribute for each file. Files in subfolders can also be persisted.

[assembly: AssemblyInfoHelper.GitHub.UpdatePersistentFiles("Filename1.txt")]
[assembly: AssemblyInfoHelper.GitHub.UpdatePersistentFiles("Folder\\Filename2.txt")]

It is also possible to persist all files matching a specific pattern. This can be used to persist e.g. all database files with the ".db" extension (see the following example). Use * as wildcard as placeholder.

[assembly: AssemblyInfoHelper.GitHub.UpdatePersistentFiles("*.db")]

If the file doesn't exist, it is simply not persisted and no warning or error is shown.

Temporary folder used by the update feature

The %AppData%\Local\%ProjectName% folder is used to temporary save the downloaded release. Also the files that should be persisted are saved here. Afer the update was finished, the folder content is deleted. Only the Updater.exe remains because it can't delete itself.

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net9.0-windows was computed.  net10.0-windows was computed. 
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.4.0 175 8/26/2025
5.3.1 687 6/14/2023
5.3.0 572 5/17/2023
5.2.2 783 11/11/2022
5.2.1 962 9/18/2022
5.2.0 928 7/29/2022
5.1.0 931 7/4/2022
5.0.1 941 6/24/2022
5.0.0 945 6/21/2022
4.3.1 1,049 6/19/2020
4.3.0 998 5/4/2020
4.2.1 1,065 12/13/2019
4.2.0 1,052 11/5/2019
4.1.1 1,062 8/27/2019
4.1.0 1,044 8/22/2019
4.0.0 1,026 8/12/2019
3.0.0 1,047 8/12/2019
2.0.0 1,035 8/12/2019
1.0.0 1,042 8/12/2019

Use this release with Metro styled WPF apps (using MahApps.Metro). It is suitable for .NET 6.0 apps.