i used to work with VS2013 before and there was AssemblyInfo.cs file exist in project where we mention project version and many other things.
here i am giving a content of AssemblyInfo.cs file of my old project
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MyProject")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("My Company")]
[assembly: AssemblyProduct("MyProject")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8e128185-dcf8-4f3d-9e21-e4e7bbbd7cbd")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
//[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.5.25")]
[assembly: AssemblyFileVersion("1.0.5.25")]
when i have created a winform .net core project with VS2022 IDE then i found no AssemblyInfo.cs file in project.
so tell me in .net core winform project where i can mention my
- project name
- company name
- project version ?
before this was i used to project version from AssemblyInfo.cs file this.Text = "My Project (New) " + Assembly.GetExecutingAssembly().GetName().Version;
1) please tell me where i can mention my project name, company name and version info when working with VS2022 & .net core?
2) how to read project version using c# code.
thanks