2

Problem Statement

I'm upgrading a local environment from Sitecore 10.3 to 10.3.1. The platform is easy enough to upgrade using Docker with an update to my IMAGE TAG version: 10.3-ltsc2019 to 10.3.1-ltsc2019. Upgrading my Visual Studio solution should also be straightforward with Centralized Package Management using the Packages.props file.

Before

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <PlatformVersion>10.3.0</PlatformVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Update="Sitecore.Owin.Authentication" Version="$(PlatformVersion)" />
    <PackageReference Update="Sitecore.Kernel" Version="$(PlatformVersion)" />
    <PackageReference Update="Sitecore.ContentSearch" Version="$(PlatformVersion)" />
    <PackageReference Update="Sitecore.ContentSearch.Linq" Version="$(PlatformVersion)" />
    <PackageReference Update="Sitecore.Assemblies.Platform" Version="$(PlatformVersion)" />
    <PackageReference Update="Sitecore.Assemblies.SitecoreHeadlessServicesServer" Version="21.0.*" />
    <PackageReference Update="Sitecore.LayoutService" Version="9.0.310" />
  </ItemGroup>
</Project>

After

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <PlatformVersion>10.3.1</PlatformVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Update="Sitecore.Owin.Authentication" Version="$(PlatformVersion)" />
    <PackageReference Update="Sitecore.Kernel" Version="$(PlatformVersion)" />
    <PackageReference Update="Sitecore.ContentSearch" Version="$(PlatformVersion)" />
    <PackageReference Update="Sitecore.ContentSearch.Linq" Version="$(PlatformVersion)" />
    <PackageReference Update="Sitecore.Assemblies.Platform" Version="$(PlatformVersion)" />
    <PackageReference Update="Sitecore.Assemblies.SitecoreHeadlessServicesServer" Version="21.0.*" />
    <PackageReference Update="Sitecore.LayoutService" Version="9.0.310" />
  </ItemGroup>
</Project>

However, when I build my solution, I get several build errors for Nuget dependencies that were previously included in the 10.3.0 version.

Here's a comparison of the dependency tree for the Sitecore.Kernel nuget package:

Sitecore.Kernel Dependency Tree

Are developers expected to manually add any package dependencies for Sitecore 10.3.1 and above?

What up with that?

2
  • Agreed, that is a very annoying change of approach, it will likely break the builds on many solutions that use PackageReference, not sure I see the point of it, other than making the dependency tree look neater. Commented Mar 20 at 4:04
  • I think they did it to minimize vulnerable software packages showing up in code scanning tools like Checkmarx, but I haven’t found anything in the change log that explains how the DevEx is expected to change. Commented Mar 20 at 12:42

1 Answer 1

0

After upgrading I ran into build issues because of this.

After installing the necessary NuGet packages you're now missing because of the fact that they aren't dependencies anymore, you will get errors around having version numbers in your csproj files, so you will need to remove the version numbers. Then you'll need to add the package references to Packages.Props.

In my case, I was missing Microsoft.AspNet.Identity.Core, Microsoft.AspNet.Owin and Microsoft.Extensions.DependencyInjection.Abstracts. I just installed the NuGet packages and altered the csproj files and Packages.Props.

csproj: enter image description here

Packages.props: enter image description here

2
  • Please add the code snippets with your answer along with the image for SEO purposes. Commented Mar 22 at 14:47
  • I agree with Andy. Unless Sitecore has another suggestion, it seems that developers are responsible for identifying the required, version-specific transitive dependencies of the Sitecore nuget packages for version 10.3.1+ Commented Mar 27 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.