0

I'm trying to plug a NET Standard 2.0 Nugget Package into Sitecore 10.3. I’m trying to make Microsoft.Extensions.Configuration.AzureAppConfiguration work but running into conflicts with out of the box Sitecore DLLs.

Is what I'm trying to do even achievable and if so, is there a way of not touching the out of the box DLLs?

2 Answers 2

0

I have tested and there are couple of other packages that will have to be installed in project with specific version. When installing this package make sure you install it by selecting dependencies behaviour: Ignore Dependencies in Nuget Package Manager, otherwise you will get latest versions of dependant packages. enter image description here

Highlighted dependencies should match versions that Sitecore uses but they might also install their dependant assemblies. These can be checked by downloading Assembly List for your specific version https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/103/Sitecore_Experience_Platform_103.aspx. Usually I check dll in bin and compare with expected version, then if mismatched, add to project. Below packages should help you get on right track:

    <PackageReference Update="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
    <PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
    <PackageReference Update="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="6.0.0" />
    <PackageReference Update="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
    <PackageReference Update="Microsoft.Extensions.Configuration" Version="6.0.1" />
    <PackageReference Update="System.Text.Json" Version="6.0.0" />
0

Yes, it's achievable to use a .NET Standard 2.0 NuGet package like Microsoft.Extensions.Configuration.AzureAppConfiguration with Sitecore 10.3. However, you may encounter conflicts with the out-of-the-box Sitecore DLLs due to versioning or dependency issues.

To avoid touching the OOB DLLs and mitigate conflicts, you can use below options:

  1. You can use assembly binding redirection in your application's configuration file (web.config) to redirect requests for a specific assembly version to a different version.

  2. Utilize dependency injection to inject your custom functionality or configurations without directly modifying the Sitecore DLLs.

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.