Some background: I have a project which collects all the diagnostics (trace source) information from the other projects within my solution. I needed a way to get the main project name so that I could give the dump file a proper unique name.
The issue: I could not find a clear-cut answer on how to obtain the startup project's assembly name until I ran into this blog entry: http://weblog.west-wind.com/posts/2009/Jun/09/Getting-the-Apps-Startup-Assembly-in-WPF-Designer
To get the name of the startup project, use:
string ProjectName = System.Reflection.Assembly.GetEntryAssembly().GetName().Name;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With