Skip to content
June 7, 2020 / kiranpatils

TDS update package errors with Sitecore 9.3

Challenge

Recently worked on couple of Sitecore upgrade projects, where we used TDS’s update package feature in release mode. So, we can automate package installation process using CI/CD tools.

This feature, Just works! But recently we faced two challenges which I would like to share with you. In case, you are also facing the same.

Solution

Some Basics:

Before we talk about specific errors and solutions. Would like to share with you about how Package generation works? [If you already know about this, feel free to skip this section and move to next section]

  1. I strongly recommend you to read this : https://www.hhogdev.com/help/tds/proppackaging
  2. For this feature to work – You’ve to ensure that you’ve following configurations:

Above list will work for < Sitecore 9.X version. But you need to have few additional DLLs for your Sitecore 9.X+ version.

  • Sitecore.Kernel
  • Sitecore.Update
  • Sitecore.Log
  • Sitecore.Zip
  • Microsoft.Extensions.DependencyInjection.Abstractions
  • Microsoft.Extensions.Logging.Abstractions
  • “The package builder failed. Please set the build logging level to Normal or Detailed and see the build output log for more information on the failure.”

We got above error when we were trying to use TDS package generation feature with TDS Version 6.0.0.12 and Sitecore 9.3:

As you can see above error, doesn’t provide much information about the exact error. We enabled detailed logging as explained in this post : https://sitecorebasics.wordpress.com/2017/03/02/tds-error-while-generating-update-package/

After doing above configurations, we could find following entry from log :

Looking for Sitecore assemblies in C:\projects\SCBasics\SC-New\Sitecore\packages
Found assembly C:\projects\SCBasics\SC-New\Sitecore\packages\Sitecore.Kernel.9.3.0\lib\net471\Sitecore.Kernel.dll
Found assembly C:\projects\SCBasics\SC-New\Sitecore\packages\Sitecore.Logging.9.3.0\lib\net471\Sitecore.Logging.dll
Found assembly C:\projects\SCBasics\SC-New\Sitecore\packages\Sitecore.Update.9.3.0\lib\net471\Sitecore.Update.dll
Found assembly C:\projects\SCBasics\SC-New\Sitecore\packages\Sitecore.Zip.9.3.0\lib\net471\Sitecore.Zip.dll
Found assembly C:\projects\SCBasics\SC-New\Sitecore\packages\Microsoft.Extensions.DependencyInjection.2.1.1\lib\net461\Microsoft.Extensions.DependencyInjection.dll
Found assembly C:\projects\SCBasics\SC-New\Sitecore\packages\Microsoft.Extensions.DependencyInjection.2.1.1\lib\netcoreapp2.0\Microsoft.Extensions.DependencyInjection.dll
Found assembly C:\projects\SCBasics\SC-New\Sitecore\packages\Microsoft.Extensions.DependencyInjection.2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.dll
Found assembly C:\projects\SCBasics\SC-New\Sitecore\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll
Exception Could not load file or assembly ‘Microsoft.Extensions.Logging, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’ or one of its dependencies. The system cannot find the file specified.(System.IO.FileNotFoundException):
at Sitecore.DependencyInjection.DefaultSitecoreServicesConfigurator.Configure(IServiceCollection serviceCollection)
at Sitecore.DependencyInjection.BaseServicesConfiguratorFactory.Configure(IServiceCollection serviceCollection)
at Sitecore.DependencyInjection.BaseServiceProviderBuilder.ConfigureServiceCollection()
at Sitecore.DependencyInjection.ServiceLocator.ConfigureServiceProvider()
at Sitecore.DependencyInjection.ServiceLocator.get_ServiceProvider()
at Sitecore.Configuration.Settings.<>c.<.cctor>b__351_0()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at Sitecore.Update.Update.Serialization.SerializerFactory.GetSerializationType()
at Sitecore.Update.Update.Serialization.SerializerFactory.GetSerializer()
at HedgehogDevelopment.SitecoreProject.PackageBuilder.PackageBuilder.GetSitecoreItemCommands(List1 cmds, BuildContext ctx, String projectFileFolder, Project sourceTDSProject, HashSet1 includedItems)
at HedgehogDevelopment.SitecoreProject.PackageBuilder.PackageBuilder.BuildPackage(BuildContext ctx)
at HedgehogDevelopment.SitecoreProject.PackageBuilder.Program.Main(String[] args)
C:\projects\SCBasics\SC-New\Sitecore\packages\HedgehogDevelopment.TDS.6.0.0.12\build\HedgehogDevelopment.TDS.targets(180,5): error : The package builder failed. Please set the build logging level to Normal or Detailed and see the build output log for more information on the failure.

We reached out to TDS Support team and they gave us new nuget package, which helped us resolve the issue. If you are starting your new project. I recommend you to use latest TDS version. This issue has been fixed in TDS 6.0.0.13

  • “Exception Could not load file or assembly ‘System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.(System.IO.FileNotFoundException):”

We got above error with TDS.6.0.0.14 with Sitecore 9.3

We reached out to TDS Support and this is what they replied:

This is likely caused by mixing the assemblies from .net core and standard in your package references. TDS doesn’t know which assemblies to use. The simplest way out of this is to create a folder relative to the solution root that contains just the assemblies needed by packaging and point the “Sitecore Assembly Path” value at that folder.
Please make sure to put the specific versions of the assemblies into that folder that are distributed with Sitecore. The best thing to do is to get them from the /bin folder in the Sitecore distribution. The assemblies you will likely need are:

Sitecore.Kernel
Sitecore.Update
Sitecore.Log
Sitecore.Zip
Microsoft.Extensions.DependencyInjection.Abstractions
Microsoft.Extensions.Logging.Abstractions

If you need more than this, the update package step will warn you and you can get them from the /bin folder.

After correcting our nuget references to use standard package reference and NOT .net core helped us fix the issue, Apart from that we also had to make sure that we use 2.1.1 version of Microsoft.Extensions.Options nuget package.

That’s it, Happy TDS Deployment! 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: