Assembly version

  • Thread starter Thread starter Mats-Lennart Hansson
  • Start date Start date
M

Mats-Lennart Hansson

I have a solution with many projects in. When I make a new build, I want to
change the assembly version for all projects. Is there a good way to use,
for instance, a constant so I don't need to change the assemblyversion for
each project?

Thanks,

Mats-Lennart
 
We use a CommonAssemblyInfo.cs file to do this.

1. Create the file in a folder called "Common", or whatever you like.
2. Copy the AssemblyVersion attribute from one of your assemblyinfo.cs
files
3. In each project, click "Add > Existing item"
4. Browse to the location of your commonassemblyinfo.cs file.
5. **DON'T* click "Open" Click on the arrow next to open and select
"Link File"
6. Edit all your assemblyinfo.cs files to remove the version
attribute.
7. Rebuild the solution. All should now have the same version number,
as defined in a single file.

Of course, you could let VS deal with the versioning automatically,
but this way gives you complete control over version numbers.


BTW, sorry this was a rushed answer. Lots to do, and too llittle
time.
 
Back
Top