Name under which assemblies are stored in the repo.

Nov 4, 2010 at 10:45 AM

I've got a potential issue around naming in the Refix  repo that I thought was worth opening to discussion.

In my project I have an output assembly (an exe in my case) that has a different name to it's actual product name or title. 

Basically my project ConfigGen.ConsoleApp actually compiles to an exe called cfg.exe, in much the same way that Refix has a different executable name to its actual product name.


The problem is that this gets added to the Refix repo as cfg.exe rather than ConfigGen.ConsoleApp.

Would it be worth reflecting on the assembly level attributes to pick out the AssemblyTitle or AssemblyProduct attributes to use as a name, if they are present?


[assembly: AssemblyVersion("")]
[assembly: AssemblyCompany("Rob Levine")]
[assembly: AssemblyCopyright("Copyright \x00a9 Rob Levine 2010")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyFileVersion("")]
[assembly: AssemblyTitle("ConfigGen.ConsoleApp")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("ConfigGen.ConsoleApp")]



Nov 12, 2010 at 11:04 AM

These are all just conventions. If you create a new class library project called Name1.Name2.csproj, then the assembly title and product will by default be set to Name1.Name2, and the default output will be Name1.Name2.dll.

So I guess the question is: is our assumption about the name and how it relates to structure in the repository totally flawed? Is it good for the majority of cases, and in need of an override option in edge cases like this? Interestingly, Refix itself would be one of these edge cases - what would by default be Refix.Console.exe is actually rfx.exe. As it happens, we could in this case extract Refix.Console from either the AssemblyTitle or the AssemblyProduct attribute, but this is purely because we haven't changed them.

Would we want something like this for example? I'm undecided and open to persuasion...

rfx reg --override-name Refix.Console.exe rfx.exe

Nov 12, 2010 at 11:56 AM

You do have a point - a quick straw poll of .Net executables on my system shows that people use these attributes for very different things. Sometimes the "true" assembly name, sometimes an English language product name, etc, etc. I guess my suggestion of trying to automatically divine the true name is flawed, so your suggestions of allowing it to be specified is a good idea.

Unless you want to go down a route of allowing an optional refix metadata file to sit alongside assemblies containing refix specific metadata. Not sure how applicable this might be to most usage scenarios though.