Lemutec.BuildTimestampGenerator
1.1.2
dotnet add package Lemutec.BuildTimestampGenerator --version 1.1.2
NuGet\Install-Package Lemutec.BuildTimestampGenerator -Version 1.1.2
<PackageReference Include="Lemutec.BuildTimestampGenerator" Version="1.1.2" />
<PackageVersion Include="Lemutec.BuildTimestampGenerator" Version="1.1.2" />
<PackageReference Include="Lemutec.BuildTimestampGenerator" />
paket add Lemutec.BuildTimestampGenerator --version 1.1.2
#r "nuget: Lemutec.BuildTimestampGenerator, 1.1.2"
#:package Lemutec.BuildTimestampGenerator@1.1.2
#addin nuget:?package=Lemutec.BuildTimestampGenerator&version=1.1.2
#tool nuget:?package=Lemutec.BuildTimestampGenerator&version=1.1.2
🛠⏲ BuildTimestampGenerator
Have you wanted a way to reliably get the time your application was compiled at, but still wanted to have 'deterministic' builds enabled? Well then do I have the package for you!
This is a small Roslyn source generator that outputs a class, BuildTimestamp, that contains several variables that describe when the source generator was run (and thus when your project was built.)
Here is a forked repo, since the word is not allowed in the source code.
❓Usage
- Reference the source generator (sometimes called 'analyzer') in your
.csproj, to install it from NuGet:
<ItemGroup>
<PackageReference Include="Lemutec.BuildTimestampGenerator" Version="*" PrivateAssets="all" />
</ItemGroup>
- If you want to refrence the project on disk rather than the NuGet package, see an example reference here.
- Build once so packages are restored and source can be generated.
- Use the properties of the class
Lemutec.BuildTimestampto determine your compile time!
❗Example
📥Source
using System;
namespace HelloTimestamp;
internal class Program
{
private static void Main(string[] args)
{
Console.WriteLine($"I was built at {Lemutec.BuildTimestamp.BuildTime}");
}
}
📤Output
I was built at 1/27/2022 12:54:21 PM
(Obviously, your output will vary.)
📝 License
Lemutec.BuildTimestampGenerator is licensed under the Zero-Clause BSD License (SPDX-License-Identifier: 0BSD). If you're interested in cmdwtf.BuildTimestampGenerator under other terms, please contact the authors. cmdwtf.BuildTimestampGenerator may make use of several open source packages. Those packages are each covered by their own copyrights and licenses, which are available via the tooling you use to restore the packages when building. As well, some portions of code are distributed under terms of other licenses, which are designated in comments. See copyright for more details.
Copyright © 2022 Chris March Dailey
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. 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. |
-
.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.
Initial release.