Gapotchenko.FX.AppModel.Information 2024.1.3

Prefix Reserved
dotnet add package Gapotchenko.FX.AppModel.Information --version 2024.1.3                
NuGet\Install-Package Gapotchenko.FX.AppModel.Information -Version 2024.1.3                
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="Gapotchenko.FX.AppModel.Information" Version="2024.1.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Gapotchenko.FX.AppModel.Information --version 2024.1.3                
#r "nuget: Gapotchenko.FX.AppModel.Information, 2024.1.3"                
#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.
// Install Gapotchenko.FX.AppModel.Information as a Cake Addin
#addin nuget:?package=Gapotchenko.FX.AppModel.Information&version=2024.1.3

// Install Gapotchenko.FX.AppModel.Information as a Cake Tool
#tool nuget:?package=Gapotchenko.FX.AppModel.Information&version=2024.1.3                

Overview

The module provides functionality for getting information about the app.

Information About the Current App

To get information about the current app, use AppInformation.Current property:

using Gapotchenko.FX.AppModel.Information;
using System;

var info = AppInformation.Current;

Console.WriteLine("Product: {0}", info.ProductName);
Console.WriteLine("Version: {0}", info.ProductVersion);
Console.WriteLine("Company: {0}", info.CompanyName);
Console.WriteLine("Copyright: {0}", info.Copyright);

This can be useful for purposes like showing an about box in GUI or a copyright banner in console.

Information About Another Part of the App

Sometimes a program consists of several parts, each of which has its own associated product information.

To get information about a specific part of the program other than the main app, use AppInformation.For(Type) method:

using Gapotchenko.FX.AppModel.Information;
using System;

var info = AppInformation.For(typeof(object));

Console.WriteLine("Product: {0}", info.ProductName);
Console.WriteLine("Version: {0}", info.ProductVersion);
Console.WriteLine("Company: {0}", info.CompanyName);
Console.WriteLine("Copyright: {0}", info.Copyright);

Note that the example above gets information for System.Object type which belongs to .NET BCL (Base Class Library), another part of the program. The retrieved information about that part looks like so:

Product: Microsoft® .NET
Version: 8.0.824.36612
Company: Microsoft Corporation
Copyright: © Microsoft Corporation. All rights reserved.

You can use this functionality to retrieve information about any other part of the program. It can be a plugin, a library, and so on.

There also exists AppInformation.For(Assembly) overload of the For method. That method overload retrieves information about a specific assembly. It is useful for situations when you have no specific System.Type at hand to retrieve the information for, but only a System.Assembly.

Note that it is preferable to use AppInformation.For(Type) method because it is slightly more precise than AppInformation.For(Assembly).

Commonly Used Types

  • Gapotchenko.FX.AppModel.AppInformation

Other Modules

Let's continue with a look at some other modules provided by Gapotchenko.FX:

Or look at the full list of modules.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 is compatible.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 is compatible.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
2024.1.3 76 11/10/2024
2022.2.7 505 5/1/2022
2022.2.5 414 5/1/2022
2022.1.4 423 4/6/2022
2021.2.21 475 1/21/2022
2021.2.20 459 1/17/2022
2021.1.5 377 7/6/2021
2020.2.2-beta 338 11/21/2020
2020.1.15 464 11/5/2020
2020.1.9-beta 321 7/14/2020
2020.1.8-beta 341 7/14/2020
2020.1.7-beta 346 7/14/2020
2020.1.1-beta 393 4/12/2020