Console-based applications include Alpine (an e-mail client), cmus (an audio player), Irssi (an IRC client), Lynx (a web browser), Midnight Commander (a file manager), Music on Console (an audio player), Mutt (an e-mail client), nano (a text editor), ne (a text editor), newsbeuter (an RSS reader), and ranger (a file ...
Open Visual Studio, and choose Create a new project in the Start window. In the Create a new project window, select All languages, and then choose C# from the dropdown list. Choose Windows from the All platforms list, and choose Console from the All project types list.
A Windows form application is an application that has a graphical user interface(GUI) like the Visual C# IDE. A console program on the other hand is a text application. There are not fancy controls like buttons or textboxes in a console application and they are run from the command prompt.
Assembly.GetExecutingAssembly().GetName().Version
Also, you can still use the class, you just have to reference the containing assembly. It's no biggie.
Assembly.GetExecutingAssembly().GetName().Version
is not the same as Application.ProductVersion
(but may be good enough depending on your environment.
As can be seen with Lutz Reflector, Application.ProductVersion
first attempts to use the AssemblyInformationalVersion attribute from Assembly.GetEntryAssembly()
if it's present, and if GetEntryAssembly()
is not null.
Otherwise it uses the file version of the executable file.
I don't see any reason not to use Application.ProductVersion
in a console application.
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