In this tutorial, you will learn how to stop accidentally upgrading Episerver in Nuget! Recently, Episerver has moved to a bi-weekly release schedule, which is great as you can constantly upgrade. If you're working on a large project with 7+ people, when someone adds a new class library, goes to Nuget and adds Episerver.Core it can be very easy for them to select a different version. This can not only cause bugs and issues, but it can also result in re-basing and merging hell, which isn't fun.
To get around this problem, there is a very simple process you can follow that will prevent your project from accidentally being upgraded. Most developers when adding a new package via Nuget, try to add the package by clicking on the individual project and add the packages they want... don't do this! Instead of adding packages on a project level, you need to add packages on a solution level. To do this, right click on your solution and click Manage Nuget packages for the solution
. From the Nuget Package Manager click on Installed packages
:
From this screen, you will find a list of packages already installed in your solution. All you need to do is find the package you want to add to your new project and add it this way. In this example, I want to add Episerver.CMS.Core
. Click the manage
button:
From here, you will now see a screen with all the projects in your solution. Each project will have a checkbox next to it. Simply find the newly created project you want to install the package into and click it 🖱️🖱️🖱️
That's it 🔥🔥🔥. If you follow this simple process you'll never accidentally get package mismatches in your solution. When you start working on projects with a mix of CMS, Commerce, Find, CMO just following this process will really simplify your merging process. Happy Coding 🤘