I have an MVC module developed on DNN8 that was working fine. The DNN 8 site was corrupted, it was my local development DNN site. I've since installed a source copy of DNN 9 and have it running fine.
The module was pushed to an Azure site and is working fine. I just need to do further work on it locally. So, installed DNN 9 and there were some issues. Newtonsoft.Json version 7 is in use on the Azure site, it's latest stable is 11.0.2. However, DNN 9 out of the box forces version 10.0.3. Not knowing this blew up my first instance of DNN 9 on my dev machine.
The issue has been fixed by making sure all NuGet packages in the module match what packages are in use by DNN 9.
The working module folder was copied down from the Azure site since it is the most reliable. The packages saved from DNN 8 were hosed.
The module from Azure builds fine. The module folder was copied to the new DNN 9 local site, /DesktopModules/MVC. The solution in its folder was opened in Visual Studio 2015 Community, edits done and then built. Builds fine to the module /install/modules folder, builds a source code and install copy of the module.
Trying now to install the module on the DNN 9 instance throws an error but the error log is no help:
An unknown error has occured. Please check your installation zip file and try again.
Common issues with bad installation files:
- Zip file size is too large, check your IIS settings for max upload file size. -- size is 57KB, IIS 10 is set to 30MB
- Missing resources in the zip file. -- this is a Chris Hammond project, it built fine in DNN 8. This was pushed to Azure, copied from there and touched up after putting it in the DNN9 site /DesktopModules/MVC as noted above. Should have all resources.
- Invalid files in the package. -- this should not be the case.
- File extension is not .zip. -- Yep, it's a zip file
- Check that you are logged in. -- Yep, sure was :)
I'm thinking the most likely culprit is a missing or invalid resource / file. Where is there a checklist of what files should be there?
Here is what is in /packages:
MS AspNet MVC 5.1.1
Razor 3.1.2
Web pages 3.1.1
Infrastructure 1.0.0
MS Build Tasks 1.5.0.214
NewtonsoftJson 10.0.3
I just made sure all blocked extensions such as .resx, .cs, .csproj, etc. are allowed, restarted IIS. This didn't fix it.
Here is the error I'm getting:
2018-04-17 20:56:38.309-04:00 [DESKTOP-2EBCEEN][D:2][T:17][FATAL] DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication - System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at DotNetNuke.Entities.Modules.Definitions.ModuleDefinitionInfo.ReadModuleControls(XmlReader reader) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Entities\Modules\Definitions\ModuleDefinitionInfo.cs:line 294
at DotNetNuke.Entities.Modules.Definitions.ModuleDefinitionInfo.ReadXml(XmlReader reader) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Entities\Modules\Definitions\ModuleDefinitionInfo.cs:line 207
at DotNetNuke.Entities.Modules.DesktopModuleInfo.ReadModuleDefinitions(XmlReader reader) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Entities\Modules\DesktopModuleInfo.cs:line 800
at DotNetNuke.Entities.Modules.DesktopModuleInfo.ReadXml(XmlReader reader) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Entities\Modules\DesktopModuleInfo.cs:line 520
at DotNetNuke.Common.Utilities.CBO.DeserializeObject[TObject](XmlReader reader) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Common\Utilities\CBO.cs:line 603
at DotNetNuke.Services.Installer.Installers.ModuleInstaller.ReadManifest(XPathNavigator manifestNav) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Services\Installer\Installers\ModuleInstaller.cs:line 297
at DotNetNuke.Services.Installer.Installers.InstallerFactory.GetInstaller(XPathNavigator manifestNav, PackageInfo package) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Services\Installer\Installers\InstallerFactory.cs:line 164
at DotNetNuke.Services.Installer.Installers.PackageInstaller.ReadComponents(XPathNavigator manifestNav) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Services\Installer\Installers\PackageInstaller.cs:line 193
at DotNetNuke.Services.Installer.Installers.PackageInstaller.ReadManifest(XPathNavigator manifestNav) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Services\Installer\Installers\PackageInstaller.cs:line 523
at DotNetNuke.Services.Installer.Installers.PackageInstaller..ctor(String packageManifest, InstallerInfo info) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Services\Installer\Installers\PackageInstaller.cs:line 109
at DotNetNuke.Services.Installer.Installer.ProcessPackages(XPathNavigator rootNav) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Services\Installer\Installer.cs:line 287
at DotNetNuke.Services.Installer.Installer.ReadManifest(Boolean deleteTemp) in D:\Clients\Durthaler Tech Services\Sites\DNN9\Dnn.Platform\DNN Platform\Library\Services\Installer\Installer.cs:line 544
at Dnn.PersonaBar.Extensions.Components.InstallController.GetInstaller(Stream stream, String fileName, Int32 portalId, String legacySkin, Boolean isPortalPackage)
at Dnn.PersonaBar.Extensions.Components.InstallController.ParsePackage(PortalSettings portalSettings, UserInfo user, String filePath, Stream stream)
at Dnn.PersonaBar.Extensions.Services.ExtensionsController.<>c__DisplayClass39_1.b__1(Object )
at System.Web.Util.SynchronizationHelper.SafeWrapCallback(Action action