Why is this so long winded to get AssemblyInfo?
Why is this so long winded to get AssemblyInfo?
Is this really the only way to access AssemblyInfo details?
CODE
Assembly.GetEntryAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false).Cast<AssemblyProductAttribute>().FirstOrDefault().Product
This seems ridiculously complicated to get some simple information about my application.
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
RE: Why is this so long winded to get AssemblyInfo?
The AssemblyInfo details are so that you can see something about your assembly in windows.
It is a compiled class so the only way to see it is via reflection.
If you want to be able to access this frequently in a more user friendly manner then just write yourself a static class which does the work.
Do you want some custom SIM scripts developed. Contact me via my website http://www.microspostools.com/
RE: Why is this so long winded to get AssemblyInfo?
Good to know I wasn't beating around the bush, when there was a more direct approach.
I've written a helper static class to manage version control utilising the AssemblyInfo, so I won't need to keep writing such code.
Thanks for input, it's appreciated.
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music