Skip to content

[Bug]: DNN 9.13.6 Upgrade Overwrites Newer DLL, Breaking 2sxc Module #6222

@tvatavuk

Description

@tvatavuk

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

When upgrading a DNN 9.13.4 site with 2sxc 18.4 to DNN 9.13.5+, the 2sxc module stops working. The DNN upgrade overwrites System.Runtime.CompilerServices.Unsafe.dll version 6.0.0.0 with an older version 4.0.4.1, causing compatibility issues with 2sxc.

The DNN upgrade should not break the 2sxc module. It should preserve newer versions of DLLs or handle dependencies correctly to ensure that modules depending on newer versions continue to function.

Steps to reproduce?

  1. Install DNN 9.13.4 with the 2sxc 18.4 module.
  2. Verify that 2sxc is working correctly.
  3. Upgrade DNN to version 9.13.6.
  4. Observe that the 2sxc module stops working and throws exceptions.

Detailed steps and discussion are available at 2sic/2sxc#3511.

Current Behavior

  • The 2sxc 18+ module installs System.Runtime.CompilerServices.Unsafe.dll version 6.0.0.0 in the bin directory.
  • After upgrading to DNN 9.13.5+, the DLL is overwritten with version 4.0.4.1.
  • The web.config and the Assemblies table in the DNN database still reference version 6.0.0.0.
  • As a result, 2sxc, which depends on version 6.0.0.0, fails to work and throws exceptions.

Expected Behavior

The DNN upgrade process should not overwrite newer DLLs with older versions without appropriately handling assembly bindings. It should:

  • Preserve newer versions of DLLs if they exist.
  • Update web.config and the Assemblies table to reflect any changes in DLL versions.
  • Ensure that modules depending on newer DLL versions continue to function after the upgrade.

Relevant log output

System.ArgumentNullException: Value cannot be null. Parameter name: collection
   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at ToSic.Eav.Apps.Services.AppDataStackService.GetStack(AppThingsIdentifiers target, IEntity viewPart) in C:\Projects\2sxc\eav-server\ToSic.Eav.Core\Apps\Services\AppDataStackService.cs:line 40
   at ToSic.Eav.Apps.Services.AppDataStackService.GetStack(String part, IEntity viewPart) in C:\Projects\2sxc\eav-server\ToSic.Eav.Core\Apps\Services\AppDataStackService.cs:line 31
   at ToSic.Lib.Helpers.GetOnce`1.Get(Func`1 generator) in C:\Projects\2sxc\eav-server\ToSic.Lib.Core\Helpers\GetOnce.cs:line 38
   at ToSic.Sxc.LookUp.Internal.SxcAppDataConfigProvider.GetLookupEngineForContext(IContextOfSite context, IApp appForLookup, IBlock blockForLookupOrNull) in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic.Sxc\LookUp\Internal\SxcAppDataConfigProvider.cs:line 63
   at ToSic.Sxc.LookUp.Internal.SxcAppDataConfigProvider.GetDataConfiguration(EavApp app, AppDataConfigSpecs specs) in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic.Sxc\LookUp\Internal\SxcAppDataConfigProvider.cs:line 21
   at ToSic.Eav.Apps.Internal.EavApp.<get_AppDataConfig>b__22_0() in C:\Projects\2sxc\eav-server\ToSic.Eav.Apps\Eav.Apps.Internal\App\EavApp_Data.cs:line 17
   at ToSic.Lib.Helpers.GetOnce`1.Get(Func`1 generator) in C:\Projects\2sxc\eav-server\ToSic.Lib.Core\Helpers\GetOnce.cs:line 38
   at ToSic.Eav.Apps.Internal.EavApp.<get_ConfigurationProvider>b__19_0() in C:\Projects\2sxc\eav-server\ToSic.Eav.Apps\Eav.Apps.Internal\App\EavApp_Data.cs:line 11
   at ToSic.Lib.Helpers.GetOnce`1.Get(Func`1 generator) in C:\Projects\2sxc\eav-server\ToSic.Lib.Core\Helpers\GetOnce.cs:line 38
   at ToSic.Eav.Apps.Internal.EavApp.BuildData[TDataSource,TResult]() in C:\Projects\2sxc\eav-server\ToSic.Eav.Apps\Eav.Apps.Internal\App\EavApp_Data.cs:line 39
   at ToSic.Eav.Apps.Internal.EavApp.get_Data() in C:\Projects\2sxc\eav-server\ToSic.Eav.Apps\Eav.Apps.Internal\App\EavApp_Data.cs:line 33
   at ToSic.Sxc.Web.Internal.JsContext.JsContextAll.GetJsContext(String systemRootUrl, IBlock block, String errorCode, List`1 exsOrNull, RenderStatistics statistics) in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic.Sxc\Web\Internal\JsContext\JsContextAll.cs:line 60
   at ToSic.Sxc.Blocks.Internal.Render.RenderingHelper.ContextAttributes(Int32 instanceId, Int32 contentBlockId, Boolean includeEditInfos, Boolean includeJsApiContext, String errorCode, List`1 exsOrNull, RenderStatistics statistics) in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic\ToSic.Sxc\Blocks\Internal\Render\RenderingHelper.cs:line 77
   at ToSic.Sxc.Blocks.Internal.Render.RenderingHelper.WrapInContext(String content, NoParamOrder noParamOrder, Int32 instanceId, Int32 contentBlockId, Boolean editContext, Boolean jsApiContext, String tag, Boolean addLineBreaks, String errorCode, List`1 exsOrNull, RenderStatistics statistics) in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic\ToSic.Sxc\Blocks\Internal\Render\RenderingHelper.cs:line 56
   at ToSic.Sxc.Blocks.Internal.BlockBuilder.RenderInternal(RenderSpecs specs) in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic\ToSic.Sxc\Blocks\Internal\BlockBuilder\BlockBuilder_Render.cs:line 88

Anything else?

  • This issue has been reported and discussed in the 2sxc repository: 2sic/2sxc#3511.
  • The problem appears to have started with DNN version 9.13.5, where the upgrade package includes the older System.Runtime.CompilerServices.Unsafe.dll version 4.0.4.1.
  • Manual workaround i just to copy System.Runtime.CompilerServices.Unsafe.dll version 6.0.0.0. over version 4.0.4.1. in bin folder, or reinstall 2sxc module

Affected Versions

9.13.6 (latest release)

What browsers are you seeing the problem on?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions