LinkDotNet.BuildInformation
0.1.0
See the version list below for details.
dotnet add package LinkDotNet.BuildInformation --version 0.1.0
NuGet\Install-Package LinkDotNet.BuildInformation -Version 0.1.0
<PackageReference Include="LinkDotNet.BuildInformation" Version="0.1.0" />
paket add LinkDotNet.BuildInformation --version 0.1.0
#r "nuget: LinkDotNet.BuildInformation, 0.1.0"
// Install LinkDotNet.BuildInformation as a Cake Addin #addin nuget:?package=LinkDotNet.BuildInformation&version=0.1.0 // Install LinkDotNet.BuildInformation as a Cake Tool #tool nuget:?package=LinkDotNet.BuildInformation&version=0.1.0
Incremental Build Information Generator
This project provides a simple and easy-to-use C# source generator that embeds build information, such as the build time, platform, warning level, and configuration, directly into your code. By using the BuildInformation
class, you can quickly access and display these details.
Features
- Embeds build date (in UTC) in your code
- Embeds platform (AnyCPU, x86, x64, ...) information in your code
- Embeds compiler warning level in your code
- Embeds build configuration (e.g., Debug, Release) in your code
Usage
To use the BuildInformation
class in your project, add the NuGet package:
dotnet add package LinkDotNet.BuildInformation
Here is some code how to use the class:
using System;
Console.WriteLine($"Build at: {BuildInformation.BuildAt}");
Console.WriteLine($"Platform: {BuildInformation.Platform}");
Console.WriteLine($"Warning level: {BuildInformation.WarningLevel}");
Console.WriteLine($"Configuration: {BuildInformation.Configuration}");
You can also hover over the properties to get the currently held value (xmldoc support). An example output could look like this:
Build at: 2023-03-23T12:34:56.7890123Z
Platform: AnyCPU
Warning level: 4
Configuration: Debug
Contributing
If you would like to contribute to the project, please submit a pull request or open an issue on the project's GitHub page. We welcome any feedback, bug reports, or feature requests.
License
This project is licensed under the MIT License.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.