Fun with Moniker- naming assembly versions

I liked the way docker generates names for every container instance – it was a funny way to differentiate them. I was thinking  – what about nuget packages – or any other release  ?

I have discovered Moniker – . Can be used as in docker – to generate different names at various runs. However, what I wanted is to make every release to have a funny name.

I have put in .NET Core local tools ( see  and the blog post ) and I have used from powershell ( see for the usage)

First, I have created a variable

if($result -eq 0){

$moniker = “$(dotnet moniker -s moby)-$dateToPrint”



$moniker = “$(dotnet moniker -s moniker)-$dateToPrint”


then used this variable in the release notes

$releaseNotes += (“;BuildNumber $env:BUILD_BUILDNUMBER with name “+ $moniker)

and in assembly title

dotnet-property “**/*.csproj” AssemblyTitle:”NetCoreBlockly $moniker”

Then, in C# , I write in the console:

static string nameBlockly()


var ass = Assembly.GetExecutingAssembly();

var assName = ass.GetName();

var nameBlockly = assName.Name;



var title = ass.GetCustomAttribute<AssemblyTitleAttribute>();

nameBlockly = title?.Title ?? nameBlockly;




//do nothing


return $”{nameBlockly} version:{assName.Version.ToString()}”;


If you want to see in action , you can:

  1. Look at the nuget release notes at ( see BuildNumber … with name
  2. See the change log – every release has the name
  3. Install NetCoreBlockly  and see the name