Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2sxc assemblies that are shared dependencies with DNN in bin folder should be in bin\2sxc folder if version of dll's is not the same as dnn default version #2685

Closed
tvatavuk opened this issue Mar 16, 2022 · 4 comments
Assignees

Comments

@tvatavuk
Copy link
Contributor

tvatavuk commented Mar 16, 2022

I'm submitting a ...
[x] feature request

...about
[x] DNN parts

Current behavior
There is issue with DNN upgrade as explained #2684 that can break future DNN upgrades and requires manual workaround by user.

Goal is to upgrade 2sxc installation to avoid this DNN upgrade issues in future.

Plan is that 2sxc installation should deploy and install dll's that are shared with DNN (currently in bin folder) to separate bin\Imageflow folder if version of dll's is not the same as dnn default version. Assembly binding redirection should be limited only to this non default dnn version that is in use by 2sxc only. Installation should also take a care of complications that could follow, when we install 2sxc v13+ to older dnn v7.4.2 (that do not have dependency on this dll's) but newer dnn version after upgrade will deploy this dll's again. 2sxc unit tests should be updated to use shared dlls from dnn.

Expected behavior

Instructions to Reproduce the Problem

Why change the behavior?

Your environment

  • 2sxc version(s): 11.X.X
  • Browser: [all | Chrome XX | Firefox XX | Edge XX | IE XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari ]
  • DNN: [all | 7.4.2 | 8.X.X | 9.X.X ]
  • Language: [any/all | English | German | other ]

Anything you would like to add

@tvatavuk tvatavuk changed the title 2sxc assemblies that are shared dependencies od DNN in bin folder should be in 'bin\2sxc' folder if version of dll's is not the same. 2sxc assemblies that are shared dependencies with DNN in bin folder should be in 'bin\2sxc' folder if version of dll's is not the same as dnn default version. Mar 16, 2022
@tvatavuk tvatavuk changed the title 2sxc assemblies that are shared dependencies with DNN in bin folder should be in 'bin\2sxc' folder if version of dll's is not the same as dnn default version. 2sxc assemblies that are shared dependencies with DNN in bin folder should be in bin\2sxc folder if version of dll's is not the same as dnn default version. Mar 16, 2022
@tvatavuk tvatavuk changed the title 2sxc assemblies that are shared dependencies with DNN in bin folder should be in bin\2sxc folder if version of dll's is not the same as dnn default version. 2sxc assemblies that are shared dependencies with DNN in bin folder should be in bin\2sxc folder if version of dll's is not the same as dnn default version Mar 16, 2022
tvatavuk added a commit that referenced this issue Mar 16, 2022
… same as in DNN 9+, include update Imageflow (DI v2.2.0), ToSic.Razor (DI v2.1.1)
@iJungleboy
Copy link
Contributor

Related to #2682

tvatavuk added a commit that referenced this issue Mar 17, 2022
… same as in DNN 9+, include update Imageflow (DI v2.2.0), ToSic.Razor (DI v2.1.1)
@tvatavuk
Copy link
Contributor Author

tvatavuk commented Mar 17, 2022

DNN websites that have 2sxc v13.00-v13.03, after DNN Upgrade to DNN 9.4+ version will get server error Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions' or one of its dependencies.

To prevent this server error please install 2sxc v13.04+ before DNN Upgrade.

With 2sxc v13.04 our goal was to ensure that DNN upgrade do not break DNN installation.

Root cause

Imageflow is included in 2sxc v13+ and have dependency on Microsoft.Extensions.DependencyInjection.dll v2.2.0 (and related deps) and for that reason 2sxc v13.00-v13.03 and indirectly DNN 9.4+ got DI upgrade to v2.2.0 (with assembly binding redirects) that is root cause for server error after DNN upgrade.

What we did

To avoid same issue again (and keep existing functionality) we did the following:

  • 2sxc v13.04 have dependency to Microsoft.Extensions.DependencyInjection.dll v2.1.1 (and related), so it is the same as in DNN 9.4+ install and upgrade versions to ensure that 2sxc DI directly depends on DNN DI.
  • 2sxc v13.04 deploys Microsoft.Extensions.DependencyInjection.dll v2.1.1 (and related) to DNN bin folder to enable DI also in DNN 7.4.2+ (minimal DNN version for 2sxc).
  • Imageflow still have dependency to Microsoft.Extensions.DependencyInjection.dll v2.2.0 but that version is in bin/Imageflow subfolder, so it will not overwrite and upgrade DNN DI dlls. Also assembly binding redirect for only this specific version are added to web.config so Imageflow can find right version of its deps.

What we tested

Various clean install and upgrade scenarios are tested with DNN 7.4.2; 9.4.4; 9:10.1; 9.10.2 and 2sxc 12.10 LTS; 13.03; 13.04 to confirm that fix solution works as intended.

@jeremy-farrance
Copy link

I just wanted to insure that you saw this and had an opportunity to follow or chime in if needed.

Updates to the Microsoft.DependencyInjection.* Libraries #5058

@iJungleboy
Copy link
Contributor

@jeremy-farrance thanks. We just discussed this on our bi-weekly meeting and just everybody agreed this would be important

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

3 participants