endjin/Templify — Issue #25: Smart replacement mechanism -- __GUID()__ or similar
Author: robrich
Created: 2011-11-28 16:16:29+00:00
State: open

For both [assembly:Guid()] in AssemblyInfo.cs and the node in .csproj files, each new copy should have their own guid, not the guid of the folder that I cloned. I'd like a "smart replacement" mechanism where I can specify one of a few pre-canned functions to call. Perhaps in this case, the token is "__GUID()__".

Other cool replacements could be __DATE()__ or __YEAR()__ or __USER()__ or __COMPANY()__ pulled from DateTime.Now, DateTime.Year, %USERNAME%, and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOrganization (so says http://support.microsoft.com/kb/310441). These additional replacements are used in other AssemblyInfo.cs attributes, and though my templified copies will all be correct, sharing my templates yields incorrect results for my co-workers / social friends.