I want to use a GUID to uniquely identify my Application and to get at this value from within the code. I see that there is a GUID that would be ideal in the DPROJ:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{D4DB842C-FB4C-481B-8952-77DA04E37102}</ProjectGuid>
Does this get into the exe anywhere, eg as a resource? If not, what is the neatest way of linking in this GUID value into my exe file and reading it in code. The above GUID resides in a dedicated text file and is pasted into the DPROJ with my DprojMaker tool, so I can INCLUDE it in anything you might suggest. Thanks
AFAIK the
<ProjectGUID>
is not embedded in the Exe file, but you can create an application to read the project guid and insert as a resource in your exe.Check this sample app which read a file a create/updates a resource in a exe.
Now from your app, you can use the Post build events to call this application on this way
And use like so :