My company is working towards moving our development from C++.net into C#. Our product has standard monthly release (for instance, 5.0.19.2...).
In in C++.net, we had a common app.rc file, that standardized the company info, as well as version number. Since every project within the solution would include the same app.rc file once, it was very easy to change the version info on over 200 projects.
How does this solution translate into the C# world? The questions that I checked before writing this mention it through the property window in the solution explorer, but that is not what I want.
I know the assemblyinfo.cs contains the information I want to modify, but I don't think I could have one master file. Do I need to split it up into multiple files?
Thanks in advance!
C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...
What is C? C is a general-purpose programming language created by Dennis Ritchie at the Bell Laboratories in 1972. It is a very popular language, despite being old. C is strongly associated with UNIX, as it was developed to write the UNIX operating system.
In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.
Compared to other languages—like Java, PHP, or C#—C is a relatively simple language to learn for anyone just starting to learn computer programming because of its limited number of keywords.
You can add a file as a link instead of the actual file. E.g, my solution could be:
Solution
- My Project
- Properties
- AssemblyInfo.cs
- SharedAssemblyInfo.cs (Linked)
- Solution Items
- SharedAssemblyInfo.cs
When you add an existing item to the solution, you can use the drop down arrow on the Add
link, and select Add as Link
. The SharedAssemblyInfo.cs
file can contain common/shared assembly attributes, e.g.:
[assembly: AssemblyVersion("2.0.*")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyCompany("My Company")]
... etc. The project local can contain project specific attributes:
[assembly: AssemblyTitle("My Assembly")]
... etc.
It's a common practice in c# solutions to comment out version information in the assemblyinfo.cs of each project and then have a single common "shared_assemblyinfo.cs" (named to taste) that contains version information and is shared across all projects...
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