You are using Helix principles with your Sitecore project.
Great!!!
You are listening well to the Sitecore Gurus and following the divine path.
You are setting up TDS, MsBuild server and Octopus deploy for you Continuous Integration.
Sweet!!
You might run into issue where you need to have consistent Assembly version for all the projects. You are energetic, you go change your AssemblyInfo file for all 50 different project in your solution and see the code flow from your machine to MsBuild server to Octopus and to your Int or QA.
Life is Good !!!
Except, your boss hires an intern, who is high energy and start doing lot’s of changes. And forgets to update assembly versions on few of those 50 projects…. now your build server throwing up Red bars at you….grrrrrr.
Fire the intern…. wait, you really need someone to help you with other tasks. So what should you do. Only if you could make things simpler.
Well, I will give you a solution before you finish that cup of coffee.
Use a Global Assembly file.
How?
- Open any of the MVC project you have in your solution.
- Expand Properties.
- Double Click AssemblyInfo.CS and copy the whole thing.
- Create a new CS file where you Solution is located (.sln file). Call it GlobalAssembly.cs
- CRTL+A and CRTL+V on the file to delete everything and replace it with the code you copied.
- Delete the line where it says [assembly: Guid(“………..
- Right click on solution and create a New Solution folder (This step is not necessary if you have a folder name configuration, in that case create this file in that folder)
- Right click on solution, add existing items and select GlobalAssembly.CS.
- Go to your MVC project(s)
- Right click on the Properties
- Add existing item
- Select the GlobalAssembly.cs and “Add As Link” instead of the standard (There is a dropdown on that button to choose between those)
- In the same project, select Assembly.cs and remove all the lines except the [assembly: Guid(“…………… and on the top using System.Runtime.InteropServices;
- Save
- Do this for all the MVC projects.
- Build
- Check the DLL for version number
- Now increase the version number on the GlobalAssembly.cs file and build again.
- Check the version number, it should be the new version.
- Keep the intern.
Good luck.