Using package references in your Sitecore Project

Part of the upgrade in a Sitecore project is to remove the package.config file and change the way how we handle all Sitecore references.

So, let’s follow these steps:

Ok, so until here isn’t a big deal, right?

So let’s do the following in the project

At this point, you just need to add the Sitecore references specific to your project. e.g:

Add again the references to System.* libraries like these ones:

it should look like this:

Now, Compile your project and review if all the code works similarly before these changes.

You will see again all the dlls in your bin folder, now let’s reduce those files only with the necessary ones.

<IncludeAssets>Compile</IncludeAssets>

You will see a reduced number of dlls copies to the bin directory

And, finally, let’s fix the “web.config” file to have the assembly bindings correctly working

You’re gonna see a warning like this one:

Don’t forget to remove the comment section in the file.

And that is pretty much it.

Repeat this process in each Sitecore project in your solution

Happy coding! 🙂