Skip to content

Instantly share code, notes, and snippets.

View WernerMairl's full-sized avatar

Werner Mairl WernerMairl

  • Vienna
View GitHub Profile
@mjebrahimi
mjebrahimi / Benchmark.cs
Last active December 3, 2022 11:52
BenchmarkDotNet example with most useful attributes and features
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Exporters.Csv;
using BenchmarkDotNet.Order;
using BenchmarkDotNet.Running;
using EasyCompressor;
using System;
using System.Collections.Generic;
using System.IO;
@dasMulli
dasMulli / Directory.Build.targets
Last active February 27, 2020 17:18
Add Git commit count to version
<Project>
<PropertyGroup>
<GenerateNuspecDependsOn>AddGitCommitCountToVersion;$(GenerateNuspecDependsOn)</GenerateNuspecDependsOn>
<!-- this is only used in NuGet 4.6.0 -->
<GetPackageVersionDependsOn>AddGitCommitCountToVersion;$(GetPackageVersionDependsOn)</GetPackageVersionDependsOn>
</PropertyGroup>
<Target Name="AddGitCommitCountToVersion"
BeforeTargets="PrepareForBuild;_GenerateRestoreProjectSpec"
Condition=" '$(DisableGitVersionSuffix)' != 'true' ">