Skip to content
New issue

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

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

Already on GitHub? # to your account

Newtonsoft.Json v13 missing in upgrade file's BIN folder #5332

Open
tpperlman opened this issue Oct 5, 2022 · 7 comments
Open

Newtonsoft.Json v13 missing in upgrade file's BIN folder #5332

tpperlman opened this issue Oct 5, 2022 · 7 comments

Comments

@tpperlman
Copy link

tpperlman commented Oct 5, 2022

Description of bug

We performed an upgrade of a DNN v09.09.01 site using the DNN v.09.11 upgrade file and got the following error:

Uncaught Sys.Net.WebServiceFailedException: Sys.Net.WebServiceFailedException: The server method 'GetSecurityTab' failed with the following error: System.IO.FileLoadException-- Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Steps to reproduce

Upgrade a DNN install lower than v09.09.01 using the DNN v.09.11 upgrade file.

Current behavior

The install fails due to either an outdated or missing Newtonsoft.Json.dll file in the BIN folder.

Expected behavior

The Newtonsoft.Json.dll should be included in the DNN v.09.11 upgrade file and dependencies updated.

Additional context

We had to manually update the DLL from the DNN v.09.11 install file.

If an upgrade path is to install v9.10+ prior to v9.11, it hasn't been mentioned in the release notes.

@tpperlman
Copy link
Author

The following other files are also missing from the DNN v9.11 upgrade BIN folder vs. the install, not sure is there is any impact yet:

Providers/DotNetNuke.Providers.AspNetClientCapabilityProvider.dll
DotNetNuke.log4net.dll
DotNetNuke.Maintenance.deps.json
DotNetNuke.Maintenance.dll
DotNetNuke.ModulePipeline.dll
DotNetNuke.Services.Syndication.dll
DotNetNuke.SiteExportImport.dll
DotNetNuke.Web.Client.dll

@jeremy-farrance
Copy link
Contributor

I also noted that the Newtonsoft.Json.dll was missing from the Upgrade zip, however...

I used nvQuickSite 2.2 to install DNN 9.10.02 and then made note of the following DLLs:
image

Then used the 9.11.00 Upgrade zip to upgrade the site in the usual way. As you can see, after the upgrade Newtonsoft Json and PetaPoco are both the correct new versions as expected (reading the release notes).
image

So since I started at 9.10.02, there must be something about your install or the old version of DNN (you noted 9.09.x) that causes the upgrade to fail. Or maybe your upgrade process didn't finish? Have you done something as simple as restore back to 9.09.x and try the upgrade again?

Anyhow, I hope this helps. Thanks - Jeremy

@mitchelsellers
Copy link
Contributor

It is expected that the Newtonsoft Json file ias not included, that was done as a way to prevent issues with third-party modules installing a conflicting version.

What third-party modules are you using? Do you have any custom modules that manually used a higher version of Newtonsoft?

@tpperlman
Copy link
Author

Hi Folks, thank you all for the quick replies.

Our existing DNN v09.09.01 installation has a number of custom modules that have dependencies on Newtonsoft.Json:

  • Microsoft.Azure.NotificationHubs (Newtonsoft.Json >10.0.3)
  • Twilio (Newtonsoft.Json v10.0.1)
  • DeveloperForce.Force (Newtonsoft.Json>11.0.2)*
  • Stripe.Net (Newtonsoft.Json>9.0.1)

We had Newtonsoft.Json v11.0.2 installed when the upgrade was performed. The same file and web.config assembly redirect for Newtonsoft.Json v11.0.2 were there during the upgrade, when this error appeared:

Uncaught Sys.Net.WebServiceFailedException: Sys.Net.WebServiceFailedException: The server method 'GetSecurityTab' failed with the following error: System.IO.FileLoadException-- Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

So it appears that the GetSecurityTab method in the Upgrade Wizard in DNN v.09.11.00 requires Newtonsoft.Json v13? If I remove the Newtonsoft.Json.dll from the BIN folder then I get the same error message above. Only if I manually copy Newtonsoft.Json.dll v13 from the DNN v9.11 install file can the upgrade proceed, and I also needed to update the assembly redirect to Newtonsoft.Json v13 for our custom modules.

@tpperlman
Copy link
Author

As an aside, some of our custom modules also required a newer version of Microsoft.Extensions.DependencyInjection.Abstractions that is also overwritten in the DNN v09.11.00 upgrade so we had to manually upgrade that too and update the binding redirect.

@tpperlman
Copy link
Author

An additional known issue we've run into upgrading other sites that could go into release notes is that Evotiva DNN Backup also needs to be updated prior to upgrading as noted in issue #5278

@valadas valadas added this to the Future: Patch milestone Jan 18, 2023
@stale
Copy link

stale bot commented Jun 18, 2023

We have detected this issue has not had any activity during the last 90 days. That could mean this issue is no longer relevant and/or nobody has found the necessary time to address the issue. We are trying to keep the list of open issues limited to those issues that are relevant to the majority and to close the ones that have become 'stale' (inactive). If no further activity is detected within the next 14 days, the issue will be closed automatically.
If new comments are are posted and/or a solution (pull request) is submitted for review that references this issue, the issue will not be closed. Closed issues can be reopened at any time in the future. Please remember those participating in this open source project are volunteers trying to help others and creating a better DNN Platform for all. Thank you for your continued involvement and contributions!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants